Changeset 3194
- Timestamp:
- 03/03/2010 01:37:14 PM (6 months ago)
- Location:
- trunk/src/arcemu-world
- Files:
-
- 5 modified
-
Creature.cpp (modified) (2 diffs)
-
GameObject.cpp (modified) (1 diff)
-
GameObject.h (modified) (1 diff)
-
Object.cpp (modified) (2 diffs)
-
SpellEffects.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/arcemu-world/Creature.cpp
r3193 r3194 1294 1294 m_aiInterface->timed_emotes = objmgr.GetTimedEmoteList(spawn->id); 1295 1295 1296 m_faction = dbcFactionTemplate.LookupEntryForced(spawn->factionid); 1297 if(m_faction) 1298 { 1299 m_factionDBC = dbcFaction.LookupEntry(m_faction->Faction); 1300 // not a neutral creature 1301 if(!(m_factionDBC->RepListId == -1 && m_faction->HostileMask == 0 && m_faction->FriendlyMask == 0)) 1302 { 1303 GetAIInterface()->m_canCallForHelp = true; 1304 } 1296 // not a neutral creature 1297 if(!(m_factionDBC->RepListId == -1 && m_faction->HostileMask == 0 && m_faction->FriendlyMask == 0)) 1298 { 1299 GetAIInterface()->m_canCallForHelp = true; 1305 1300 } 1306 1301 … … 1525 1520 m_position.ChangeCoords( x, y, z, o ); 1526 1521 m_spawnLocation.ChangeCoords(x, y, z, o); 1527 m_faction = dbcFactionTemplate.LookupEntryForced(proto->Faction); 1528 1529 if(m_faction) 1530 { 1531 m_factionDBC = dbcFaction.LookupEntry(m_faction->Faction); 1532 // not a neutral creature 1533 if(!(m_factionDBC->RepListId == -1 && m_faction->HostileMask == 0 && m_faction->FriendlyMask == 0)) 1534 { 1535 GetAIInterface()->m_canCallForHelp = true; 1536 } 1522 1523 // not a neutral creature 1524 if(!(m_factionDBC->RepListId == -1 && m_faction->HostileMask == 0 && m_faction->FriendlyMask == 0)) 1525 { 1526 GetAIInterface()->m_canCallForHelp = true; 1537 1527 } 1538 1528 -
trunk/src/arcemu-world/GameObject.cpp
r3174 r3194 457 457 { 458 458 SetFaction(spawn->faction); 459 m_faction = dbcFactionTemplate.LookupEntryForced(spawn->faction);460 if(m_faction)461 m_factionDBC = dbcFaction.LookupEntry(m_faction->Faction);462 459 } 463 460 SetScale( spawn->scale); -
trunk/src/arcemu-world/GameObject.h
r3171 r3194 330 330 float GetParentRotation( uint8 rot ) { return GetFloatValue(GAMEOBJECT_PARENTROTATION+rot); } 331 331 332 void SetFaction( uint32 id ) { SetUInt32Value(GAMEOBJECT_FACTION, id); } 332 void SetFaction( uint32 id ) 333 { 334 SetUInt32Value(GAMEOBJECT_FACTION, id); 335 _setFaction(); 336 } 333 337 uint32 GetFaction() { return GetUInt32Value(GAMEOBJECT_FACTION); } 334 338 -
trunk/src/arcemu-world/Object.cpp
r3186 r3194 1551 1551 factT = dbcFactionTemplate.LookupEntryForced(TO_UNIT(this)->GetFaction()); 1552 1552 if( !factT ) 1553 sLog.out Detail("Unit does not have a valid faction. It will make him act stupid in world. Don't blame us, blame yourself for not checking :P, faction %u set to entry %u",TO_UNIT(this)->GetFaction(),GetEntry() );1553 sLog.outError("Unit does not have a valid faction. It will make him act stupid in world. Don't blame us, blame yourself for not checking :P, faction %u set to entry %u",TO_UNIT(this)->GetFaction(),GetEntry() ); 1554 1554 } 1555 1555 else … … 1558 1558 factT = dbcFactionTemplate.LookupEntryForced(static_cast<GameObject*>(this)->GetFaction()); 1559 1559 if( !factT ) 1560 sLog.out Detail("Game Object does not have a valid faction. It will make him act stupid in world. Don't blame us, blame yourself for not checking :P, faction %u set to entry %u",static_cast<GameObject*>(this)->GetFaction(),GetEntry() );1560 sLog.outError("Game Object does not have a valid faction. It will make him act stupid in world. Don't blame us, blame yourself for not checking :P, faction %u set to entry %u",static_cast<GameObject*>(this)->GetFaction(),GetEntry() ); 1561 1561 } 1562 1562 -
trunk/src/arcemu-world/SpellEffects.cpp
r3185 r3194 4187 4187 p->SetFaction(proto->Faction ); 4188 4188 } 4189 4190 p->m_faction = dbcFactionTemplate.LookupEntryForced(proto->Faction);4191 if(p->m_faction)4192 p->m_factionDBC = dbcFaction.LookupEntry(p->m_faction->Faction);4193 4189 p->PushToWorld(u_caster->GetMapMgr()); 4194 4190 //make sure they will be desummoned (roxor)