diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Creature.cpp | 4 | ||||
-rw-r--r-- | src/game/ObjectMgr.cpp | 3 | ||||
-rw-r--r-- | src/game/Wintergrasp.cpp | 9 | ||||
-rw-r--r-- | src/game/Wintergrasp.h | 2 | ||||
-rw-r--r-- | src/game/ZoneScript.h | 3 |
5 files changed, 13 insertions, 8 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 78b40f28194..f817e8a57c9 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -1444,9 +1444,9 @@ float Creature::GetSpellDamageMod(int32 Rank) bool Creature::CreateFromProto(uint32 guidlow, uint32 Entry, uint32 team, const CreatureData *data) { SetZoneScript(); - if(m_zoneScript) + if(m_zoneScript && data) { - Entry = m_zoneScript->GetCreatureEntry(guidlow, Entry); + Entry = m_zoneScript->GetCreatureEntry(guidlow, data); if(!Entry) return false; } diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index a8073abbad0..f85d0db2c08 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -1128,13 +1128,14 @@ void ObjectMgr::LoadCreatures() } // I do not know why but in db most display id are not zero - if(data.displayid == 11686) + /*if(data.displayid == 11686 || data.displayid == 24719) { (const_cast<CreatureInfo*>(cInfo))->flags_extra |= CREATURE_FLAG_EXTRA_TRIGGER; } else if(data.displayid == cInfo->Modelid_A1 || data.displayid == cInfo->Modelid_A2 || data.displayid == cInfo->Modelid_H1 || data.displayid == cInfo->Modelid_H2) data.displayid = 0; + */ if(data.equipmentId > 0) // -1 no equipment, 0 use default { diff --git a/src/game/Wintergrasp.cpp b/src/game/Wintergrasp.cpp index 51c5759bf13..0d30dfb78e0 100644 --- a/src/game/Wintergrasp.cpp +++ b/src/game/Wintergrasp.cpp @@ -168,15 +168,18 @@ void OPvPWintergrasp::ChangeDefender() m_timer = 600000; // for test, should be 2 hour 30 min } -uint32 OPvPWintergrasp::GetCreatureEntry(uint32 guidlow, uint32 entry) +uint32 OPvPWintergrasp::GetCreatureEntry(uint32 guidlow, const CreatureData *data) { if(m_defender == TEAM_ALLIANCE) { - TeamPairMap::const_iterator itr = m_creEntryPair.find(entry); + TeamPairMap::const_iterator itr = m_creEntryPair.find(data->id); if(itr != m_creEntryPair.end()) + { + const_cast<CreatureData*>(data)->displayid = 0; return itr->second; + } } - return entry; + return data->id; } void OPvPWintergrasp::OnCreatureCreate(Creature *creature, bool add) diff --git a/src/game/Wintergrasp.h b/src/game/Wintergrasp.h index 5a39652cecd..f43d461ea9f 100644 --- a/src/game/Wintergrasp.h +++ b/src/game/Wintergrasp.h @@ -80,7 +80,7 @@ class OPvPWintergrasp : public OutdoorPvP explicit OPvPWintergrasp() : m_tenacityStack(0) {} bool SetupOutdoorPvP(); - uint32 GetCreatureEntry(uint32 guidlow, uint32 entry); + uint32 GetCreatureEntry(uint32 guidlow, const CreatureData *data); //uint32 GetGameObjectEntry(uint32 guidlow, uint32 entry); void OnCreatureCreate(Creature *creature, bool add); diff --git a/src/game/ZoneScript.h b/src/game/ZoneScript.h index e0674d3fdd4..da8a71c6a92 100644 --- a/src/game/ZoneScript.h +++ b/src/game/ZoneScript.h @@ -21,6 +21,7 @@ #include "Common.h" +struct CreatureData; class Creature; class GameObject; @@ -29,7 +30,7 @@ class TRINITY_DLL_SPEC ZoneScript public: explicit ZoneScript() {} - virtual uint32 GetCreatureEntry(uint32 guidlow, uint32 entry) { return entry; } + virtual uint32 GetCreatureEntry(uint32 guidlow, const CreatureData *data) { return data->id; } virtual uint32 GetGameObjectEntry(uint32 guidlow, uint32 entry) { return entry; } virtual void OnCreatureCreate(Creature *, bool add) {} |