feat(Core/WorldState): improved WorldState scripting (#20141)
* implement world state script based on https://github.com/cmangos/mangos-wotlk/commit/0b87ca9d9edf2d4752a3c0f8e9cf85c6689ca861 Co-authored-by: killerwife <killerwife@gmail.com> * refactor to use onleave and onenter instead of spell_area allows players to right click remove adal's buff * add MapMgr.h * refactor: use condition enum instead of uint32, prefix WORLD_STATE where needed * remove lock from WorldState::Update sWorldState->Update() is only called from World::Update * remove unsafe SmartAI action of setWorldState --------- Co-authored-by: killerwife <killerwife@gmail.com>
This commit is contained in:
@@ -730,8 +730,10 @@ void Map::ScriptsProcess()
|
||||
break;
|
||||
}
|
||||
|
||||
// Playsound.Flags bitmask: 0/2=without/with distance dependent
|
||||
if (step.script->Playsound.Flags & SF_PLAYSOUND_DISTANCE_SOUND)
|
||||
// Playsound.Flags bitmask: 0/2/4=without/with distance dependent/radius
|
||||
if (step.script->Playsound.Flags & SF_PLAYSOUND_DISTANCE_RADIUS)
|
||||
object->PlayRadiusSound(step.script->Playsound.SoundID, step.script->Playsound.Radius);
|
||||
else if (step.script->Playsound.Flags & SF_PLAYSOUND_DISTANCE_SOUND)
|
||||
object->PlayDistanceSound(step.script->Playsound.SoundID, player);
|
||||
else
|
||||
object->PlayDirectSound(step.script->Playsound.SoundID, player);
|
||||
|
||||
Reference in New Issue
Block a user