diff options
| author | Treeston <treeston.mmoc@gmail.com> | 2016-02-24 13:39:31 +0100 |
|---|---|---|
| committer | Treeston <treeston.mmoc@gmail.com> | 2016-02-24 13:39:31 +0100 |
| commit | 4e4b2b9a138650ebe6087e18dc392f08dafe4e37 (patch) | |
| tree | 1cfd8828e572d34b801aaf26847a93e500e8d492 /src/server/scripts/Spells | |
| parent | dab661c8dad6016f98a0e7c190a00eae49bc58b5 (diff) | |
| parent | 2f14664340ba486a226a0c48d285e7141a16b62f (diff) | |
Merge pull request #16644 from Treeston/3.3.5-customcharmai
Core/UnitAI: Rework creature-controlled player behavior.
Diffstat (limited to 'src/server/scripts/Spells')
| -rw-r--r-- | src/server/scripts/Spells/spell_dk.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 3cea620559a..f1ad785c13d 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -22,7 +22,7 @@ */ #include "Player.h" -#include "UnitAI.h" +#include "PlayerAI.h" #include "ScriptMgr.h" #include "SpellScript.h" #include "SpellAuraEffects.h" @@ -1909,9 +1909,9 @@ public: if (!player || player->GetGhoulResurrectGhoulGUID().IsEmpty()) return; - oldAI = player->GetAI(); + oldAI = player->AI(); oldAIState = player->IsAIEnabled; - player->SetAI(new player_ghoulAI(player, player->GetGhoulResurrectGhoulGUID())); + player->SetAI(static_cast<UnitAI*>(new player_ghoulAI(player, player->GetGhoulResurrectGhoulGUID()))); player->IsAIEnabled = true; } @@ -1922,8 +1922,8 @@ public: return; player->IsAIEnabled = oldAIState; - UnitAI* thisAI = player->GetAI(); - player->SetAI(oldAI); + PlayerAI* thisAI = player->AI(); + player->SetAI(static_cast<UnitAI*>(oldAI)); delete thisAI; // Dismiss ghoul if necessary @@ -1943,7 +1943,7 @@ public: AfterEffectRemove += AuraEffectRemoveFn(spell_dk_raise_ally_AuraScript::OnRemove, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); } - UnitAI* oldAI; + PlayerAI* oldAI; bool oldAIState; }; |
