aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-19 14:41:30 -0600
committermegamage <none@none>2009-03-19 14:41:30 -0600
commita2392121f0a8fed9f19ddadfa2880ed6f4691381 (patch)
tree2089f3b40d4460c7a45cdb9d1429f8bd2f3ea3c3 /src/game/Unit.cpp
parent74985e84904c46f1e137bed577d0b3806b33b867 (diff)
*Fix the bug that summon dbc is not read. Now creatures can be summoned.
*Make minipet as tempsummon instead of pet. Make totem as tempsummon. --HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index d0f55f33e5e..abb8843efb6 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -50,6 +50,7 @@
#include "PetAI.h"
#include "NullCreatureAI.h"
#include "Traveller.h"
+#include "TemporarySummon.h"
#include <math.h>
@@ -4381,7 +4382,7 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
{
if(AurSpellInfo->Effect[i] == SPELL_EFFECT_SUMMON)
if(SummonPropertiesEntry const *SummonProperties = sSummonPropertiesStore.LookupEntry(AurSpellInfo->EffectMiscValueB[i]))
- if(SummonProperties->Group == SUMMON_TYPE_POSSESSED)
+ if(SummonProperties->Category == SUMMON_CATEGORY_POSSESSED)
{
((Player*)caster)->StopCastingCharm();
break;
@@ -8325,8 +8326,8 @@ void Unit::UnsummonAllTotems()
continue;
Creature *OldTotem = ObjectAccessor::GetCreature(*this, m_TotemSlot[i]);
- if (OldTotem && OldTotem->isTotem())
- ((Totem*)OldTotem)->UnSummon();
+ if(OldTotem && OldTotem->isSummon())
+ ((TempSummon*)OldTotem)->UnSummon();
}
}
@@ -11355,6 +11356,7 @@ void Unit::RemoveFromWorld()
// cleanup
if(IsInWorld())
{
+ UnsummonAllTotems();
RemoveCharmAuras();
RemoveBindSightAuras();
RemoveNotOwnSingleTargetAuras();