*Update summon system.

*Fix the bug that shaman cannot summon fire elemental.
*Fix the bug that totem meters cannot be displayed.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-02 19:24:22 -05:00
parent abe9b27ee4
commit 122d944945
12 changed files with 124 additions and 98 deletions

View File

@@ -1614,6 +1614,8 @@ TempSummon *Map::SummonCreature(uint32 entry, float x, float y, float z, float a
|| properties->Type == SUMMON_TYPE_VEHICLE
|| properties->Type == SUMMON_TYPE_VEHICLE2)
mask = SUMMON_MASK_VEHICLE;
else if(properties->Type == SUMMON_TYPE_MINIPET)
mask = SUMMON_MASK_MINION;
}
uint32 phase = PHASEMASK_NORMAL, team = 0;
@@ -1630,6 +1632,7 @@ TempSummon *Map::SummonCreature(uint32 entry, float x, float y, float z, float a
case SUMMON_MASK_SUMMON: summon = new TempSummon (properties, summoner); break;
case SUMMON_MASK_GUARDIAN: summon = new Guardian (properties, summoner); break;
case SUMMON_MASK_TOTEM: summon = new Totem (properties, summoner); break;
case SUMMON_MASK_MINION: summon = new Minion (properties, summoner); break;
default: return NULL;
}
if(!summon->Create(objmgr.GenerateLowGuid(HIGHGUID_UNIT), this, phase, entry, team))
@@ -1776,7 +1779,7 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
pet->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
pet->InitStatsForLevel(getLevel());
SetGuardian(pet, true);
SetMinion(pet, true);
switch(petType)
{