Core/ObjectMgr: Refactor sCreatureStorage
This commit is contained in:
1 parent
e2e9431ca3
commit
c51c817a45
45 files changed
+474
-396
No files matched your search
@@ -454,10 +454,10 @@ public:
|
||||
// faction is set in creature_template - not inside creature
|
||||
|
||||
// update in memory
|
||||
if (CreatureInfo const *cinfo = pCreature->GetCreatureInfo())
|
||||
if (CreatureTemplate const *cinfo = pCreature->GetCreatureInfo())
|
||||
{
|
||||
const_cast<CreatureInfo*>(cinfo)->faction_A = factionId;
|
||||
const_cast<CreatureInfo*>(cinfo)->faction_H = factionId;
|
||||
const_cast<CreatureTemplate*>(cinfo)->faction_A = factionId;
|
||||
const_cast<CreatureTemplate*>(cinfo)->faction_H = factionId;
|
||||
}
|
||||
|
||||
// and DB
|
||||
@@ -528,7 +528,7 @@ public:
|
||||
uint32 displayid = target->GetDisplayId();
|
||||
uint32 nativeid = target->GetNativeDisplayId();
|
||||
uint32 Entry = target->GetEntry();
|
||||
CreatureInfo const* cInfo = target->GetCreatureInfo();
|
||||
CreatureTemplate const* cInfo = target->GetCreatureInfo();
|
||||
|
||||
int64 curRespawnDelay = target->GetRespawnTimeEx()-time(NULL);
|
||||
if (curRespawnDelay < 0)
|
||||
@@ -1110,7 +1110,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
CreatureInfo const* cInfo = creatureTarget->GetCreatureInfo();
|
||||
CreatureTemplate const* cInfo = creatureTarget->GetCreatureInfo();
|
||||
|
||||
if (!cInfo->isTameable (player->CanTameExoticPets()))
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user