Jump to content

[HELP] modifying port stones


Guest Drako
 Share

Recommended Posts

hi there,

I am very new to the MaNGOS code and I want to try something (I hope) simple.

All I want to do is remove the level check at the port stones in front of instances

so everybody can port everybody.

I don't want you to give me a full source code ;-)

just give me a hint, where I have to look.

That would be fine^^

thx and cu later^^

Drako

Link to comment
Share on other sites

I think it's in the conf file. If it's not, the code is in Gameobject.cpp:

        case GAMEOBJECT_TYPE_MEETINGSTONE:                  //23
       {
           GameObjectInfo const* info = GetGOInfo();

           if(user->GetTypeId()!=TYPEID_PLAYER)
               return;

           Player* player = (Player*)user;

           Player* targetPlayer = ObjectAccessor::FindPlayer(player->GetSelection());

           // accept only use by player from same group for caster except caster itself
           if(!targetPlayer || targetPlayer == player || !targetPlayer->IsInSameGroupWith(player))
               return;

           //required lvl checks!
           uint8 level = player->getLevel();
           if (level < info->meetingstone.minLevel || level > info->meetingstone.maxLevel)
               return;
           level = targetPlayer->getLevel();
           if (level < info->meetingstone.minLevel || level > info->meetingstone.maxLevel)
               return;

           spellId = 23598;

           break;
       }

Link to comment
Share on other sites

thanks, that helped a lot^^

the configuration file can only be used to disable the level detection of the instance itself (so everybody can go into the instance)

ok... I didn't try if it also affects the meeting stone... but I don't think so

so I'll look for the Gameobject.cpp and make some experiments with it to see what happens^^

rgds Drako

Link to comment
Share on other sites

        case GAMEOBJECT_TYPE_MEETINGSTONE:                  //23
       {
           GameObjectInfo const* info = GetGOInfo();

           if(user->GetTypeId()!=TYPEID_PLAYER)
               return;

           Player* player = (Player*)user;

           Player* targetPlayer = ObjectAccessor::FindPlayer(player->GetSelection());

           // accept only use by player from same group for caster except caster itself
           if(!targetPlayer || targetPlayer == player || !targetPlayer->IsInSameGroupWith(player))
               return;

           /*
          //required lvl checks!
           uint8 level = player->getLevel();
           if (level < info->meetingstone.minLevel || level > info->meetingstone.maxLevel)
               return;
           level = targetPlayer->getLevel();
           if (level < info->meetingstone.minLevel || level > info->meetingstone.maxLevel)
               return;
       */

           spellId = 23598;

           break;
       }

just comment it out here

Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use