Jump to content

Close a zone ?


Recommended Posts

Posted

Hello,

Is there any possible way, how to disable some zone of some continent - zone which doesn't have own map ?

For example, some zone of northrend ? I want to have access able Howling Fjord and Borean Tundra , but other locations disabled.. like if in enter to zone, ignore move and send some message to player..

Maybe in movementpacket update ?

And I don't want a solution like spawn some objects on the ways to this location..

Thanks for advice

Charlie

EDIT:

Ok, I done something like

   uint32 zone = GetZoneId(movementInfo.x, movementInfo.y, movementInfo.z);
   uint32 map = _player->GetMapId(); 

   if(!_player->isGameMaster() && map == 571 && (zone != 495 || zone != 3537))
   { 
       // inform player
       ChatHandler(_player).PSendSysMessage(LANG_BEZ_PRYC);

       // hearthstone
       _player->CastSpell(_player, 7355, false);

       // ignore this movement change 
       return;
   }

To movementhandler.cpp HandleMovementOpcodes() .. if someone have better solution, lets write..

Posted

You could add code in Player::UpdateZone(uint32 newZone) (in player.cpp)

something like:

if( !isGameMaster() && ( GetMap() ==571 && (newZone != 495 || newZone != 3537)))
{
    ChatHandler(_player).PSendSysMessage(LANG_BEZ_PRYC);  
    RemoveSpellCooldown(7355); // remove hearthstone cooldown, just incase it is on cooldown
    CastSpell(this, 7355, true);   // cast hearthstone (triggered, so it is instant)
}

Posted
You could add code in Player::UpdateZone(uint32 newZone) (in player.cpp)

something like:

if( !isGameMaster() && ( GetMap() ==571 && (newZone != 495 || newZone != 3537)))
{
    ChatHandler(_player).PSendSysMessage(LANG_BEZ_PRYC);  
    RemoveSpellCooldown(7355); // remove hearthstone cooldown, just incase it is on cooldown
    CastSpell(this, 7355, true);   // cast hearthstone (triggered, so it is instant)
}

Ok, I will do it, thank you.. maybe also would be better to don't cast hearthstone but port to somewhere in "old zone" .. I will try make it. Thanks

Posted

Btw we use a scripted NPC to teleport players out of closed areas, you can write a simple AI which will teleport anyone (except GMs for example) on sight. It has disadvantage in large areas (you will have to spawn many of those teleporters to cover it). But is has one big advantage - any GM with spawning rights can close/open any location, zone, instance, so no need to touch the sources, recompile and restart.

Tabak

Posted
Btw we use a scripted NPC to teleport players out of closed areas, you can write a simple AI which will teleport anyone (except GMs for example) on sight. It has disadvantage in large areas (you will have to spawn many of those teleporters to cover it). But is has one big advantage - any GM with spawning rights can close/open any location, zone, instance, so no need to touch the sources, recompile and restart.

Tabak

It isn't problem for me to recompile and restart server.. in my appeniant , it is more comroftable and faster way than spawn and then delete spawn some creature with ai..

Best way would be repair "No man" buffs..

×
×
  • 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