aboutsummaryrefslogtreecommitdiff
path: root/src/game/ObjectMgr.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-05-30 22:15:05 -0500
committermegamage <none@none>2009-05-30 22:15:05 -0500
commit8d1f4f9ea0beb503e2a3014abb95263e501ef1c5 (patch)
tree41d48951c315129dee817befa40d4dab90d3fd14 /src/game/ObjectMgr.cpp
parentb5778357d9d8c5fb10da5d99c46b48250578cb49 (diff)
*Provide another way to implement dynamic spawns. Now a creature will call its zonescript before spawn to determine the spawned entry. This can be used to implement zones such as wintergrasp with less data requirement (only need to know the entry of counterpart creatures, not require spawn points)
*Use zonescript as basic class of opvp script and dugeon script (can also be used for bg) *Store zonescript in worldobject. *Add door for sapphiron. --HG-- branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r--src/game/ObjectMgr.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 7232da67103..e23d114f0f2 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -894,13 +894,7 @@ uint32 ObjectMgr::ChooseDisplayId(uint32 team, const CreatureInfo *cinfo, const
display_id = cinfo->GetRandomValidModelId();
}
else
- {
display_id = data->displayid; // overwritten from creature data
- // I do not know why but in db most display id are not zero
- if(display_id == cinfo->Modelid_A1 || display_id == cinfo->Modelid_A2
- || display_id == cinfo->Modelid_H1 || display_id == cinfo->Modelid_H2)
- display_id = cinfo->GetRandomValidModelId();
- }
return display_id;
}
@@ -1068,7 +1062,7 @@ void ObjectMgr::LoadCreatures()
heroicCreatures.insert(cInfo->HeroicEntry);
//TODO: remove this
- gameeventmgr.mGameEventCreatureGuids.resize(52*2-1);
+ //gameeventmgr.mGameEventCreatureGuids.resize(52*2-1);
barGoLink bar(result->GetRowCount());
@@ -1115,6 +1109,11 @@ void ObjectMgr::LoadCreatures()
continue;
}
+ // I do not know why but in db most display id are not zero
+ 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
{
if(!GetEquipmentInfo(data.equipmentId))
@@ -1172,7 +1171,7 @@ void ObjectMgr::LoadCreatures()
}
//if(entry == 32307 || entry == 32308)
- if(entry == 30739 || entry == 30740)
+ /*if(entry == 30739 || entry == 30740)
{
gameEvent = 51;
uint32 guid2 = objmgr.GenerateLowGuid(HIGHGUID_UNIT);
@@ -1183,7 +1182,7 @@ void ObjectMgr::LoadCreatures()
data2.displayid = 0;
gameeventmgr.mGameEventCreatureGuids[51+51].push_back(guid);
gameeventmgr.mGameEventCreatureGuids[51+50].push_back(guid2);
- }
+ }*/
if (gameEvent==0 && PoolId==0) // if not this is to be managed by GameEvent System or Pool system
AddCreatureToGrid(guid, &data);