Changeset 260 for trunk/src/game/Creature.cpp
- Timestamp:
- 11/21/08 08:47:55 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/Creature.cpp
r230 r260 178 178 float x,y,z,o; 179 179 GetRespawnCoord(x, y, z, &o); 180 MapManager::Instance().GetMap(GetMapId(), this)->CreatureRelocation(this,x,y,z,o);180 GetMap()->CreatureRelocation(this,x,y,z,o); 181 181 } 182 182 … … 210 210 } 211 211 212 Set UInt32Value(OBJECT_FIELD_ENTRY, Entry);// normal entry always212 SetEntry(Entry); // normal entry always 213 213 m_creatureInfo = cinfo; // map mode related always 214 214 … … 353 353 lootForBody = false; 354 354 355 if(m_originalEntry != Get UInt32Value(OBJECT_FIELD_ENTRY))355 if(m_originalEntry != GetEntry()) 356 356 UpdateEntry(m_originalEntry); 357 357 … … 372 372 373 373 //Call AI respawn virtual function 374 AI()->JustRespawned();375 376 MapManager::Instance().GetMap(GetMapId(), this)->Add(this);374 i_AI->JustRespawned(); 375 376 GetMap()->Add(this); 377 377 } 378 378 break; … … 436 436 // do not allow the AI to be changed during update 437 437 m_AI_locked = true; 438 AI()->UpdateAI(diff);438 i_AI->UpdateAI(diff); 439 439 m_AI_locked = false; 440 440 } … … 2097 2097 } 2098 2098 2099 char const* Creature::GetScriptName() const 2100 { 2101 return ObjectMgr::GetCreatureTemplate(GetEntry())->ScriptName; 2099 std::string Creature::GetScriptName() 2100 { 2101 return objmgr.GetScriptName(GetScriptId()); 2102 } 2103 2104 uint32 Creature::GetScriptId() 2105 { 2106 return ObjectMgr::GetCreatureTemplate(GetEntry())->ScriptID; 2102 2107 } 2103 2108