*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
This commit is contained in:
megamage committed 2009-03-19 14:41:30 -06:00
1 parent 74985e8490
commit a2392121f0
21 files changed
+111 -128

No files matched your search

+5 -3
View File
@@ -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();