Core/GameObject: Implemented OnFlagTaken/OnFlagDropped hooks for GAMEOBJECT_TYPE_FLAGSTAND

Port From (https://github.com/TrinityCore/TrinityCore/commit/0535a61cb7c9da97f05e5867ce181d91e3dd92eb)
This commit is contained in:
Hondacrx
2024-11-10 22:51:48 -05:00
parent b2edaa6051
commit 3603e644af
3 changed files with 41 additions and 9 deletions
+5
View File
@@ -54,6 +54,11 @@ namespace Game.Maps
public virtual bool CanCaptureFlag(AreaTrigger areaTrigger, Player player) { return false; }
public virtual void OnCaptureFlag(AreaTrigger areaTrigger, Player player) { }
// This hook is used with GAMEOBJECT_TYPE_FLAGSTAND. Newer gameobjects use GAMEOBJECT_TYPE_NEW_FLAG and should use `OnFlagStateChange`
public virtual void OnFlagTaken(GameObject flag, Player player) { }
// This hook is used with GAMEOBJECT_TYPE_FLAGSTAND. Newer gameobjects use GAMEOBJECT_TYPE_NEW_FLAG and should use `OnFlagStateChange`. The GameObject doesn't exist anymore, but the ObjectGuid does
public virtual void OnFlagDropped(ObjectGuid flagGuid, Player player) { }
}
public class ControlZoneHandler