aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/game/AI/CoreAI/GameObjectAI.h23
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.cpp2
-rw-r--r--src/server/game/AI/SmartScripts/SmartAI.h2
-rwxr-xr-xsrc/server/game/Scripting/ScriptMgr.cpp2
4 files changed, 16 insertions, 13 deletions
diff --git a/src/server/game/AI/CoreAI/GameObjectAI.h b/src/server/game/AI/CoreAI/GameObjectAI.h
index b9d385ba675..f4555649210 100644
--- a/src/server/game/AI/CoreAI/GameObjectAI.h
+++ b/src/server/game/AI/CoreAI/GameObjectAI.h
@@ -33,21 +33,24 @@ class GameObjectAI
explicit GameObjectAI(GameObject* g) : go(g) {}
virtual ~GameObjectAI() {}
- virtual void UpdateAI(const uint32 /*diff*/) {}
+ virtual void UpdateAI(uint32 /*diff*/) {}
virtual void InitializeAI() { Reset(); }
virtual void Reset() {};
- static int Permissible(const GameObject* go);
+ static int Permissible(GameObject const* go);
- virtual bool GossipHello(Player* /*player*/) {return false;}
- virtual bool GossipSelect(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/) {return false;}
- virtual bool GossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) {return false;}
- virtual bool QuestAccept(Player* /*player*/, Quest const* /*quest*/) {return false;}
- virtual bool QuestReward(Player* /*player*/, Quest const* /*quest*/, uint32 /*opt*/) {return false;}
- virtual uint32 GetDialogStatus(Player* /*player*/) {return 100;}
+ virtual bool GossipHello(Player* /*player*/) { return false; }
+ virtual bool GossipSelect(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/) { return false; }
+ virtual bool GossipSelectCode(Player* /*player*/, uint32 /*sender*/, uint32 /*action*/, char const* /*code*/) { return false; }
+ virtual bool QuestAccept(Player* /*player*/, Quest const* /*quest*/) { return false; }
+ virtual bool QuestReward(Player* /*player*/, Quest const* /*quest*/, uint32 /*opt*/) { return false; }
+ virtual uint32 GetDialogStatus(Player* /*player*/) { return 100; }
virtual void Destroyed(Player* /*player*/, uint32 /*eventId*/) {}
+ virtual uint32 GetData(uint32 /*id*/) { return 0; }
+ virtual void SetData64(uint32 /*id*/, uint64 /*value*/) {}
+ virtual uint64 GetData64(uint32 /*id*/) { return 0; }
virtual void SetData(uint32 /*id*/, uint32 /*value*/) {}
virtual void OnGameEvent(bool /*start*/, uint16 /*eventId*/) {}
virtual void OnStateChanged(uint32 /*state*/, Unit* /*unit*/) { }
@@ -58,8 +61,8 @@ class NullGameObjectAI : public GameObjectAI
public:
explicit NullGameObjectAI(GameObject* g);
- void UpdateAI(const uint32 /*diff*/) {}
+ void UpdateAI(uint32 /*diff*/) {}
- static int Permissible(const GameObject* /*go*/) { return PERMIT_BASE_IDLE; }
+ static int Permissible(GameObject const* /*go*/) { return PERMIT_BASE_IDLE; }
};
#endif
diff --git a/src/server/game/AI/SmartScripts/SmartAI.cpp b/src/server/game/AI/SmartScripts/SmartAI.cpp
index 4eb7f8a7f50..2a412bffb22 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.cpp
+++ b/src/server/game/AI/SmartScripts/SmartAI.cpp
@@ -854,7 +854,7 @@ int SmartGameObjectAI::Permissible(const GameObject* g)
return PERMIT_BASE_NO;
}
-void SmartGameObjectAI::UpdateAI(const uint32 diff)
+void SmartGameObjectAI::UpdateAI(uint32 diff)
{
GetScript()->OnUpdate(diff);
}
diff --git a/src/server/game/AI/SmartScripts/SmartAI.h b/src/server/game/AI/SmartScripts/SmartAI.h
index 94e5e65cf8b..bfd1c7b9d41 100644
--- a/src/server/game/AI/SmartScripts/SmartAI.h
+++ b/src/server/game/AI/SmartScripts/SmartAI.h
@@ -239,7 +239,7 @@ public:
SmartGameObjectAI(GameObject* g) : GameObjectAI(g), go(g) {}
~SmartGameObjectAI() {}
- void UpdateAI(const uint32 diff);
+ void UpdateAI(uint32 diff);
void InitializeAI();
void Reset();
SmartScript* GetScript() { return &mScript; }
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index 9de0951c5ef..01d56cf8060 100755
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -959,7 +959,7 @@ GameObjectAI* ScriptMgr::GetGameObjectAI(GameObject* go)
ASSERT(go);
GET_SCRIPT_RET(GameObjectScript, go->GetScriptId(), tmpscript, NULL);
- tmpscript->GetAI(go);
+ return tmpscript->GetAI(go);
}
bool ScriptMgr::OnAreaTrigger(Player* player, AreaTriggerEntry const* trigger)