Show
Ignore:
Timestamp:
11/21/08 08:47:55 (17 years ago)
Author:
yumileroy
Message:

*DB script table stucture change. Source Mangos. Also fix some bugs. Hopefully this rev will make program usable again.

Original author: megamage
Date: 2008-11-20 10:43:20-06:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/Creature.cpp

    r230 r260  
    178178    float x,y,z,o; 
    179179    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); 
    181181} 
    182182 
     
    210210    } 
    211211 
    212     SetUInt32Value(OBJECT_FIELD_ENTRY, Entry);              // normal entry always 
     212    SetEntry(Entry);                                        // normal entry always 
    213213    m_creatureInfo = cinfo;                                 // map mode related always 
    214214 
     
    353353                lootForBody         = false; 
    354354 
    355                 if(m_originalEntry != GetUInt32Value(OBJECT_FIELD_ENTRY)) 
     355                if(m_originalEntry != GetEntry()) 
    356356                    UpdateEntry(m_originalEntry); 
    357357 
     
    372372 
    373373                //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); 
    377377            } 
    378378            break; 
     
    436436                // do not allow the AI to be changed during update 
    437437                m_AI_locked = true; 
    438                 AI()->UpdateAI(diff); 
     438                i_AI->UpdateAI(diff); 
    439439                m_AI_locked = false; 
    440440            } 
     
    20972097} 
    20982098 
    2099 char const* Creature::GetScriptName() const 
    2100 { 
    2101     return ObjectMgr::GetCreatureTemplate(GetEntry())->ScriptName; 
     2099std::string Creature::GetScriptName() 
     2100{ 
     2101    return objmgr.GetScriptName(GetScriptId()); 
     2102} 
     2103 
     2104uint32 Creature::GetScriptId() 
     2105{ 
     2106    return ObjectMgr::GetCreatureTemplate(GetEntry())->ScriptID; 
    21022107} 
    21032108