EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   quest::pvp / SetPVP() on EVENT_ENTERZONE broken (https://www.eqemulator.org/forums/showthread.php?t=30816)

snorkle 03-14-2010 06:36 PM

quest::pvp / SetPVP() on EVENT_ENTERZONE broken
 
I've tried this with both PvP disabled/enabled by default and it seems to have the same problem. It works fine if it's triggered a few seconds later after the ENTERZONE event but otherwise it gets overwritten.

Example:
ENTERZONE, SetPVP(0): name turns blue and message "no longer following the ways of discord"
1 second elapses, name turns red again


sub EVENT_ENTERZONE {
if($zonesn =~ /^freportw$/) {
$client->SetPVP(0);
$client->Message(15, "You've entered a safe zone, PvP is disabled");
}
else {
quest::pvp("on");
$client->Message(15, "You've entered a PvP zone, PvP is ENABLED!!!!");
}
}


If I set a timer for a few seconds after the event and turn pvp off again it will stick. I've tried to find somewhere else in the code where it resets it but can't find it. I think it might be related to SendAppearancePacket() updating the whole zone when you zone it but it's using the old data from the zone you just came from rather than the new m_pp.pvp flag.


All times are GMT -4. The time now is 03:46 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.