Changeset 126
- Timestamp:
- 11/19/08 13:38:32 (17 years ago)
- Location:
- trunk/src/game
- Files:
-
- 6 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/ObjectAccessor.cpp
r120 r126 534 534 std::set<WorldObject *> activeobjects(i_activeobjects); 535 535 536 std::set<WorldObject *>::const_iterator itr; 537 for(itr = activeobjects.begin(); itr != activeobjects.end(); ++itr) 538 { 539 (*itr)->GetMap()->resetMarkedCells(); 536 std::set<WorldObject *>::iterator itr, next; 537 for(itr = activeobjects.begin(); itr != activeobjects.end(); itr = next) 538 { 539 next = itr; 540 ++next; 541 if((*itr)->IsInWorld()) 542 (*itr)->GetMap()->resetMarkedCells(); 543 else 544 activeobjects.erase(itr); 540 545 } 541 546 -
trunk/src/game/ObjectMgr.cpp
r123 r126 712 712 713 713 // check model ids, supplying and sending non-existent ids to the client might crash them 714 if( !sCreatureModelStorage.LookupEntry<CreatureModelInfo>(cInfo->Modelid1))714 if(cInfo->Modelid1 && !sCreatureModelStorage.LookupEntry<CreatureModelInfo>(cInfo->Modelid1)) 715 715 { 716 716 sLog.outErrorDb("Creature (Entry: %u) has non-existing modelId_A (%u), setting it to 0", cInfo->Entry, cInfo->Modelid1); 717 717 const_cast<CreatureInfo*>(cInfo)->Modelid1 = 0; 718 718 } 719 if( !sCreatureModelStorage.LookupEntry<CreatureModelInfo>(cInfo->Modelid2))719 if(cInfo->Modelid2 && !sCreatureModelStorage.LookupEntry<CreatureModelInfo>(cInfo->Modelid2)) 720 720 { 721 721 sLog.outErrorDb("Creature (Entry: %u) has non-existing modelId_A2 (%u), setting it to 0", cInfo->Entry, cInfo->Modelid2); 722 722 const_cast<CreatureInfo*>(cInfo)->Modelid2 = 0; 723 723 } 724 if( !sCreatureModelStorage.LookupEntry<CreatureModelInfo>(cInfo->Modelid3))724 if(cInfo->Modelid3 && !sCreatureModelStorage.LookupEntry<CreatureModelInfo>(cInfo->Modelid3)) 725 725 { 726 726 sLog.outErrorDb("Creature (Entry: %u) has non-existing modelId_H (%u), setting it to 0", cInfo->Entry, cInfo->Modelid3); 727 727 const_cast<CreatureInfo*>(cInfo)->Modelid3 = 0; 728 728 } 729 if( !sCreatureModelStorage.LookupEntry<CreatureModelInfo>(cInfo->Modelid4))729 if(cInfo->Modelid4 && !sCreatureModelStorage.LookupEntry<CreatureModelInfo>(cInfo->Modelid4)) 730 730 { 731 731 sLog.outErrorDb("Creature (Entry: %u) has non-existing modelId_H2 (%u), setting it to 0", cInfo->Entry, cInfo->Modelid4); -
trunk/src/game/Pet.h
r120 r126 123 123 void AddToWorld(); 124 124 void RemoveFromWorld(); 125 // always active126 void setActive() {}127 125 128 126 PetType getPetType() const { return m_petType; } -
trunk/src/game/Player.h
r120 r126 904 904 void RemoveFromWorld(); 905 905 // always active 906 void setActive( ) {}906 void setActive(bool) {} 907 907 908 908 bool TeleportTo(uint32 mapid, float x, float y, float z, float orientation, uint32 options = 0); -
trunk/src/game/SpellEffects.cpp
r122 r126 3109 3109 uint32 level = m_caster->getLevel(); 3110 3110 Pet* spawnCreature = new Pet(SUMMON_PET); 3111 spawnCreature->setActive(m_caster->isActive()); 3111 3112 3112 3113 if(spawnCreature->LoadPetFromDB(m_caster,pet_entry)) … … 3544 3545 { 3545 3546 Pet* spawnCreature = new Pet(GUARDIAN_PET); 3547 spawnCreature->setActive(m_caster->isActive()); 3546 3548 3547 3549 Map *map = m_caster->GetMap(); … … 3938 3940 3939 3941 Pet* NewSummon = new Pet; 3942 NewSummon->setActive(m_caster->isActive()); 3940 3943 3941 3944 // petentry==0 for hunter "call pet" (current pet summoned if any) -
trunk/src/game/Totem.cpp
r123 r126 60 60 if (owner->GetTypeId()==TYPEID_PLAYER && cinfo) 61 61 { 62 if (uint32 modelid = cinfo->GetRandomValidModelId()) 62 uint32 modelid = 0; 63 if(((Player*)owner)->GetTeam() == HORDE) 64 { 65 if(cinfo->Modelid3) 66 modelid = cinfo->Modelid3; 67 else if(cinfo->Modelid4) 68 modelid = cinfo->Modelid4; 69 } 70 else 71 { 72 if(cinfo->Modelid1) 73 modelid = cinfo->Modelid1; 74 else if(cinfo->Modelid2) 75 modelid = cinfo->Modelid2; 76 } 77 if (modelid) 63 78 SetDisplayId(modelid); 64 79 else 65 { 66 sLog.outErrorDb("No displayid found for the totem with the entry %u! Can't summon it!", GetEntry()); 67 return; 68 } 80 sLog.outErrorDb("Totem::Summon: Missing modelid information for entry %u, team %u, totem will use default values.",GetEntry(),((Player*)owner)->GetTeam()); 69 81 } 70 82