diff options
| author | maximius <none@none> | 2009-10-31 02:14:25 -0700 |
|---|---|---|
| committer | maximius <none@none> | 2009-10-31 02:14:25 -0700 |
| commit | 52bab5854fe8571f2c397af8ecafaadfea50a99e (patch) | |
| tree | 5a56a6baeba67fdfa31b0fe013416505432a1658 /src/game/Creature.cpp | |
| parent | ca1e026c4f47487ed30f4b67fc1f152d84d9ee14 (diff) | |
*Fix a crash in Object.h
*Fix action button saving
*Fix a crash on item swap in guild bank
*Fix exploit moving after death in Unit.cpp
*Fix assert fail at grid load in Creature.cpp
Thanks Sisif for these! :)
--HG--
branch : trunk
Diffstat (limited to 'src/game/Creature.cpp')
| -rw-r--r-- | src/game/Creature.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp index 6b85cdfd887..dbfe024f371 100644 --- a/src/game/Creature.cpp +++ b/src/game/Creature.cpp @@ -1537,7 +1537,13 @@ bool Creature::LoadFromDB(uint32 guid, Map *map) } m_DBTableGuid = guid; - if (map->GetInstanceId() != 0) guid = objmgr.GenerateLowGuid(HIGHGUID_UNIT); + if (map->GetInstanceId() == 0) + { + if (map->GetCreature(MAKE_NEW_GUID(guid,data->id,HIGHGUID_UNIT))) + return false; + } + else + guid = objmgr.GenerateLowGuid(HIGHGUID_UNIT); uint16 team = 0; if(!Create(guid,map,data->phaseMask,data->id,0,team,data->posX,data->posY,data->posZ,data->orientation,data)) |
