mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
Merge branch 'master' into 303
Conflicts: src/game/Player.cpp src/shared/revision_nr.h
This commit is contained in:
commit
ef69f6b80c
21 changed files with 110 additions and 46 deletions
|
|
@ -249,6 +249,7 @@ CREATE TABLE `character_aura` (
|
|||
`caster_guid` bigint(20) unsigned NOT NULL default '0' COMMENT 'Full Global Unique Identifier',
|
||||
`spell` int(11) unsigned NOT NULL default '0',
|
||||
`effect_index` int(11) unsigned NOT NULL default '0',
|
||||
`stackcount` int(11) NOT NULL default '1',
|
||||
`amount` int(11) NOT NULL default '0',
|
||||
`maxduration` int(11) NOT NULL default '0',
|
||||
`remaintime` int(11) NOT NULL default '0',
|
||||
|
|
@ -1125,6 +1126,7 @@ CREATE TABLE `pet_aura` (
|
|||
`caster_guid` bigint(20) unsigned NOT NULL default '0' COMMENT 'Full Global Unique Identifier',
|
||||
`spell` int(11) unsigned NOT NULL default '0',
|
||||
`effect_index` int(11) unsigned NOT NULL default '0',
|
||||
`stackcount` int(11) NOT NULL default '1',
|
||||
`amount` int(11) NOT NULL default '0',
|
||||
`maxduration` int(11) NOT NULL default '0',
|
||||
`remaintime` int(11) NOT NULL default '0',
|
||||
|
|
|
|||
|
|
@ -47,15 +47,23 @@ AggressorAI::MoveInLineOfSight(Unit *u)
|
|||
if( !i_creature.canFly() && i_creature.GetDistanceZ(u) > CREATURE_Z_ATTACK_RANGE )
|
||||
return;
|
||||
|
||||
if( !i_creature.getVictim() && !i_creature.hasUnitState(UNIT_STAT_STUNNED) && u->isTargetableForAttack() &&
|
||||
if( !i_creature.hasUnitState(UNIT_STAT_STUNNED) && u->isTargetableForAttack() &&
|
||||
( i_creature.IsHostileTo( u ) /*|| u->getVictim() && i_creature.IsFriendlyTo( u->getVictim() )*/ ) &&
|
||||
u->isInAccessablePlaceFor(&i_creature) )
|
||||
{
|
||||
float attackRadius = i_creature.GetAttackDistance(u);
|
||||
if(i_creature.IsWithinDistInMap(u, attackRadius) && i_creature.IsWithinLOSInMap(u) )
|
||||
{
|
||||
AttackStart(u);
|
||||
u->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
|
||||
if(!i_creature.getVictim())
|
||||
{
|
||||
AttackStart(u);
|
||||
u->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
|
||||
}
|
||||
else if(sMapStore.LookupEntry(i_creature.GetMapId())->IsDungeon())
|
||||
{
|
||||
u->SetInCombatWith(&i_creature);
|
||||
i_creature.AddThreat(u, 0.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -472,7 +472,7 @@ uint8 ArenaTeam::GetSlot() const
|
|||
|
||||
void ArenaTeam::BroadcastPacket(WorldPacket *packet)
|
||||
{
|
||||
for (MemberList::iterator itr = members.begin(); itr != members.end(); itr++)
|
||||
for (MemberList::iterator itr = members.begin(); itr != members.end(); ++itr)
|
||||
{
|
||||
Player *player = objmgr.GetPlayer(itr->guid);
|
||||
if(player)
|
||||
|
|
|
|||
|
|
@ -446,6 +446,11 @@ void Creature::Update(uint32 diff)
|
|||
m_regenTimer = 2000;
|
||||
break;
|
||||
}
|
||||
case DEAD_FALLING:
|
||||
{
|
||||
if (!FallGround())
|
||||
setDeathState(JUST_DIED);
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -692,7 +697,7 @@ void Creature::prepareGossipMenu( Player *pPlayer,uint32 gossipid )
|
|||
// lazy loading single time at use
|
||||
LoadGossipOptions();
|
||||
|
||||
for( GossipOptionList::iterator i = m_goptions.begin( ); i != m_goptions.end( ); i++ )
|
||||
for( GossipOptionList::iterator i = m_goptions.begin( ); i != m_goptions.end( ); ++i )
|
||||
{
|
||||
GossipOption* gso=&*i;
|
||||
if(gso->GossipId == gossipid)
|
||||
|
|
@ -1012,7 +1017,7 @@ uint32 Creature::GetNpcTextId()
|
|||
|
||||
GossipOption const* Creature::GetGossipOption( uint32 id ) const
|
||||
{
|
||||
for( GossipOptionList::const_iterator i = m_goptions.begin( ); i != m_goptions.end( ); i++ )
|
||||
for( GossipOptionList::const_iterator i = m_goptions.begin( ); i != m_goptions.end( ); ++i )
|
||||
{
|
||||
if(i->Action==id )
|
||||
return &*i;
|
||||
|
|
@ -1343,7 +1348,15 @@ bool Creature::LoadFromDB(uint32 guid, Map *map)
|
|||
|
||||
m_respawnTime = objmgr.GetCreatureRespawnTime(m_DBTableGuid,GetInstanceId());
|
||||
if(m_respawnTime > time(NULL)) // not ready to respawn
|
||||
{
|
||||
m_deathState = DEAD;
|
||||
if(canFly())
|
||||
{
|
||||
float tz = GetMap()->GetHeight(data->posX,data->posY,data->posZ,false);
|
||||
if(data->posZ - tz > 0.1)
|
||||
Relocate(data->posX,data->posY,tz);
|
||||
}
|
||||
}
|
||||
else if(m_respawnTime) // respawn time set but expired
|
||||
{
|
||||
m_respawnTime = 0;
|
||||
|
|
@ -1482,6 +1495,9 @@ void Creature::setDeathState(DeathState s)
|
|||
if(sWorld.getConfig(CONFIG_SAVE_RESPAWN_TIME_IMMEDIATLY) || isWorldBoss())
|
||||
SaveRespawnTime();
|
||||
|
||||
if (canFly() && FallGround())
|
||||
return;
|
||||
|
||||
if(!IsStopped())
|
||||
StopMoving();
|
||||
}
|
||||
|
|
@ -1496,6 +1512,9 @@ void Creature::setDeathState(DeathState s)
|
|||
if ( LootTemplates_Skinning.HaveLootFor(GetCreatureInfo()->SkinLootId) )
|
||||
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
|
||||
|
||||
if (canFly() && FallGround())
|
||||
return;
|
||||
|
||||
Unit::setDeathState(CORPSE);
|
||||
}
|
||||
if(s == JUST_ALIVED)
|
||||
|
|
@ -1515,6 +1534,25 @@ void Creature::setDeathState(DeathState s)
|
|||
}
|
||||
}
|
||||
|
||||
bool Creature::FallGround()
|
||||
{
|
||||
// Let's abort after we called this function one time
|
||||
if (getDeathState() == DEAD_FALLING)
|
||||
return false;
|
||||
|
||||
// Let's do with no vmap because no way to get far distance with vmap high call
|
||||
float tz = GetMap()->GetHeight(GetPositionX(), GetPositionY(), GetPositionZ(), false);
|
||||
|
||||
// Abort too if the ground is very near
|
||||
if (fabs(GetPositionZ() - tz) < 0.1f)
|
||||
return false;
|
||||
|
||||
Unit::setDeathState(DEAD_FALLING);
|
||||
GetMotionMaster()->MovePoint(0, GetPositionX(), GetPositionY(), tz);
|
||||
Relocate(GetPositionX(), GetPositionY(), tz);
|
||||
return true;
|
||||
}
|
||||
|
||||
void Creature::Respawn()
|
||||
{
|
||||
RemoveCorpse();
|
||||
|
|
|
|||
|
|
@ -520,6 +520,7 @@ class MANGOS_DLL_SPEC Creature : public Unit
|
|||
const char* GetNameForLocaleIdx(int32 locale_idx) const;
|
||||
|
||||
void setDeathState(DeathState s); // overwrite virtual Unit::setDeathState
|
||||
bool FallGround();
|
||||
|
||||
bool LoadFromDB(uint32 guid, Map *map);
|
||||
void SaveToDB();
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ void QuestMenu::AddMenuItem( uint32 QuestId, uint8 Icon)
|
|||
|
||||
bool QuestMenu::HasItem( uint32 questid )
|
||||
{
|
||||
for (QuestMenuItemList::iterator i = m_qItems.begin(); i != m_qItems.end(); i++)
|
||||
for (QuestMenuItemList::iterator i = m_qItems.begin(); i != m_qItems.end(); ++i)
|
||||
{
|
||||
if(i->m_qId==questid)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ inline void PlayerCreatureRelocationWorker(Player* pl, Creature* c)
|
|||
pl->UpdateVisibilityOf(c);
|
||||
|
||||
// Creature AI reaction
|
||||
if(!c->hasUnitState(UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING))
|
||||
if(!c->hasUnitState(UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING))
|
||||
{
|
||||
if( c->AI() && c->AI()->IsVisible(pl) && !c->IsInEvadeMode() )
|
||||
c->AI()->MoveInLineOfSight(pl);
|
||||
|
|
@ -79,13 +79,13 @@ inline void PlayerCreatureRelocationWorker(Player* pl, Creature* c)
|
|||
|
||||
inline void CreatureCreatureRelocationWorker(Creature* c1, Creature* c2)
|
||||
{
|
||||
if(!c1->hasUnitState(UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING))
|
||||
if(!c1->hasUnitState(UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING))
|
||||
{
|
||||
if( c1->AI() && c1->AI()->IsVisible(c2) && !c1->IsInEvadeMode() )
|
||||
c1->AI()->MoveInLineOfSight(c2);
|
||||
}
|
||||
|
||||
if(!c2->hasUnitState(UNIT_STAT_CHASE | UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING))
|
||||
if(!c2->hasUnitState(UNIT_STAT_SEARCHING | UNIT_STAT_FLEEING))
|
||||
{
|
||||
if( c2->AI() && c2->AI()->IsVisible(c1) && !c2->IsInEvadeMode() )
|
||||
c2->AI()->MoveInLineOfSight(c1);
|
||||
|
|
|
|||
|
|
@ -1109,7 +1109,7 @@ void Group::_setLeader(const uint64 &guid)
|
|||
|
||||
void Group::_removeRolls(const uint64 &guid)
|
||||
{
|
||||
for (Rolls::iterator it = RollId.begin(); it < RollId.end(); it++)
|
||||
for (Rolls::iterator it = RollId.begin(); it < RollId.end(); ++it)
|
||||
{
|
||||
Roll* roll = *it;
|
||||
Roll::PlayerVote::iterator itr2 = roll->playerVote.find(guid);
|
||||
|
|
|
|||
|
|
@ -339,7 +339,7 @@ void InstanceSaveManager::PackInstances()
|
|||
|
||||
uint32 InstanceNumber = 1;
|
||||
// we do assume std::set is sorted properly on integer value
|
||||
for (std::set< uint32 >::iterator i = InstanceSet.begin(); i != InstanceSet.end(); i++)
|
||||
for (std::set< uint32 >::iterator i = InstanceSet.begin(); i != InstanceSet.end(); ++i)
|
||||
{
|
||||
if (*i != InstanceNumber)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -911,7 +911,7 @@ void LootTemplate::Process(Loot& loot, LootStore const& store, uint8 groupId) co
|
|||
}
|
||||
|
||||
// Rolling non-grouped items
|
||||
for (LootStoreItemList::const_iterator i = Entries.begin() ; i != Entries.end() ; i++ )
|
||||
for (LootStoreItemList::const_iterator i = Entries.begin() ; i != Entries.end() ; ++i )
|
||||
{
|
||||
if ( !i->Roll() )
|
||||
continue; // Bad luck for the entry
|
||||
|
|
@ -931,7 +931,7 @@ void LootTemplate::Process(Loot& loot, LootStore const& store, uint8 groupId) co
|
|||
}
|
||||
|
||||
// Now processing groups
|
||||
for (LootGroups::const_iterator i = Groups.begin( ) ; i != Groups.end( ) ; i++ )
|
||||
for (LootGroups::const_iterator i = Groups.begin( ) ; i != Groups.end( ) ; ++i )
|
||||
i->Process(loot);
|
||||
}
|
||||
|
||||
|
|
@ -960,7 +960,7 @@ bool LootTemplate::HasQuestDrop(LootTemplateMap const& store, uint8 groupId) con
|
|||
}
|
||||
|
||||
// Now processing groups
|
||||
for (LootGroups::const_iterator i = Groups.begin() ; i != Groups.end() ; i++ )
|
||||
for (LootGroups::const_iterator i = Groups.begin() ; i != Groups.end() ; ++i )
|
||||
if (i->HasQuestDrop())
|
||||
return true;
|
||||
|
||||
|
|
@ -978,7 +978,7 @@ bool LootTemplate::HasQuestDropForPlayer(LootTemplateMap const& store, Player co
|
|||
}
|
||||
|
||||
// Checking non-grouped entries
|
||||
for (LootStoreItemList::const_iterator i = Entries.begin() ; i != Entries.end() ; i++ )
|
||||
for (LootStoreItemList::const_iterator i = Entries.begin() ; i != Entries.end() ; ++i )
|
||||
{
|
||||
if (i->mincountOrRef < 0) // References processing
|
||||
{
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ void MapInstanced::Update(const uint32& t)
|
|||
|
||||
void MapInstanced::MoveAllCreaturesInMoveList()
|
||||
{
|
||||
for (InstancedMaps::iterator i = m_InstancedMaps.begin(); i != m_InstancedMaps.end(); i++)
|
||||
for (InstancedMaps::iterator i = m_InstancedMaps.begin(); i != m_InstancedMaps.end(); ++i)
|
||||
{
|
||||
i->second->MoveAllCreaturesInMoveList();
|
||||
}
|
||||
|
|
@ -67,7 +67,7 @@ void MapInstanced::MoveAllCreaturesInMoveList()
|
|||
|
||||
void MapInstanced::RemoveAllObjectsInRemoveList()
|
||||
{
|
||||
for (InstancedMaps::iterator i = m_InstancedMaps.begin(); i != m_InstancedMaps.end(); i++)
|
||||
for (InstancedMaps::iterator i = m_InstancedMaps.begin(); i != m_InstancedMaps.end(); ++i)
|
||||
{
|
||||
i->second->RemoveAllObjectsInRemoveList();
|
||||
}
|
||||
|
|
@ -79,7 +79,7 @@ bool MapInstanced::RemoveBones(uint64 guid, float x, float y)
|
|||
{
|
||||
bool remove_result = false;
|
||||
|
||||
for (InstancedMaps::iterator i = m_InstancedMaps.begin(); i != m_InstancedMaps.end(); i++)
|
||||
for (InstancedMaps::iterator i = m_InstancedMaps.begin(); i != m_InstancedMaps.end(); ++i)
|
||||
{
|
||||
remove_result = remove_result || i->second->RemoveBones(guid, x, y);
|
||||
}
|
||||
|
|
@ -90,11 +90,11 @@ bool MapInstanced::RemoveBones(uint64 guid, float x, float y)
|
|||
void MapInstanced::UnloadAll(bool pForce)
|
||||
{
|
||||
// Unload instanced maps
|
||||
for (InstancedMaps::iterator i = m_InstancedMaps.begin(); i != m_InstancedMaps.end(); i++)
|
||||
for (InstancedMaps::iterator i = m_InstancedMaps.begin(); i != m_InstancedMaps.end(); ++i)
|
||||
i->second->UnloadAll(pForce);
|
||||
|
||||
// Delete the maps only after everything is unloaded to prevent crashes
|
||||
for (InstancedMaps::iterator i = m_InstancedMaps.begin(); i != m_InstancedMaps.end(); i++)
|
||||
for (InstancedMaps::iterator i = m_InstancedMaps.begin(); i != m_InstancedMaps.end(); ++i)
|
||||
delete i->second;
|
||||
|
||||
m_InstancedMaps.clear();
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ Group * ObjectMgr::GetGroupByLeader(const uint64 &guid) const
|
|||
|
||||
Guild * ObjectMgr::GetGuildById(const uint32 GuildId) const
|
||||
{
|
||||
for(GuildSet::const_iterator itr = mGuildSet.begin(); itr != mGuildSet.end(); itr++)
|
||||
for(GuildSet::const_iterator itr = mGuildSet.begin(); itr != mGuildSet.end(); ++itr)
|
||||
if ((*itr)->GetId() == GuildId)
|
||||
return *itr;
|
||||
|
||||
|
|
@ -202,7 +202,7 @@ Guild * ObjectMgr::GetGuildById(const uint32 GuildId) const
|
|||
|
||||
Guild * ObjectMgr::GetGuildByName(std::string guildname) const
|
||||
{
|
||||
for(GuildSet::const_iterator itr = mGuildSet.begin(); itr != mGuildSet.end(); itr++)
|
||||
for(GuildSet::const_iterator itr = mGuildSet.begin(); itr != mGuildSet.end(); ++itr)
|
||||
if ((*itr)->GetName() == guildname)
|
||||
return *itr;
|
||||
|
||||
|
|
@ -211,7 +211,7 @@ Guild * ObjectMgr::GetGuildByName(std::string guildname) const
|
|||
|
||||
std::string ObjectMgr::GetGuildNameById(const uint32 GuildId) const
|
||||
{
|
||||
for(GuildSet::const_iterator itr = mGuildSet.begin(); itr != mGuildSet.end(); itr++)
|
||||
for(GuildSet::const_iterator itr = mGuildSet.begin(); itr != mGuildSet.end(); ++itr)
|
||||
if ((*itr)->GetId() == GuildId)
|
||||
return (*itr)->GetName();
|
||||
|
||||
|
|
@ -229,7 +229,7 @@ Guild* ObjectMgr::GetGuildByLeader(const uint64 &guid) const
|
|||
|
||||
ArenaTeam* ObjectMgr::GetArenaTeamById(const uint32 ArenaTeamId) const
|
||||
{
|
||||
for(ArenaTeamSet::const_iterator itr = mArenaTeamSet.begin(); itr != mArenaTeamSet.end(); itr++)
|
||||
for(ArenaTeamSet::const_iterator itr = mArenaTeamSet.begin(); itr != mArenaTeamSet.end(); ++itr)
|
||||
if ((*itr)->GetId() == ArenaTeamId)
|
||||
return *itr;
|
||||
|
||||
|
|
@ -238,7 +238,7 @@ ArenaTeam* ObjectMgr::GetArenaTeamById(const uint32 ArenaTeamId) const
|
|||
|
||||
ArenaTeam* ObjectMgr::GetArenaTeamByName(std::string arenateamname) const
|
||||
{
|
||||
for(ArenaTeamSet::const_iterator itr = mArenaTeamSet.begin(); itr != mArenaTeamSet.end(); itr++)
|
||||
for(ArenaTeamSet::const_iterator itr = mArenaTeamSet.begin(); itr != mArenaTeamSet.end(); ++itr)
|
||||
if ((*itr)->GetName() == arenateamname)
|
||||
return *itr;
|
||||
|
||||
|
|
@ -247,7 +247,7 @@ ArenaTeam* ObjectMgr::GetArenaTeamByName(std::string arenateamname) const
|
|||
|
||||
ArenaTeam* ObjectMgr::GetArenaTeamByCapitan(uint64 const& guid) const
|
||||
{
|
||||
for(ArenaTeamSet::const_iterator itr = mArenaTeamSet.begin(); itr != mArenaTeamSet.end(); itr++)
|
||||
for(ArenaTeamSet::const_iterator itr = mArenaTeamSet.begin(); itr != mArenaTeamSet.end(); ++itr)
|
||||
if ((*itr)->GetCaptain() == guid)
|
||||
return *itr;
|
||||
|
||||
|
|
@ -2915,7 +2915,7 @@ void ObjectMgr::LoadQuests()
|
|||
delete result;
|
||||
|
||||
// Post processing
|
||||
for (QuestMap::iterator iter = mQuestTemplates.begin(); iter != mQuestTemplates.end(); iter++)
|
||||
for (QuestMap::iterator iter = mQuestTemplates.begin(); iter != mQuestTemplates.end(); ++iter)
|
||||
{
|
||||
Quest * qinfo = iter->second;
|
||||
|
||||
|
|
@ -4134,7 +4134,7 @@ void ObjectMgr::LoadPageTexts()
|
|||
{
|
||||
std::ostringstream ss;
|
||||
ss<< "The text page(s) ";
|
||||
for (std::set<uint32>::iterator itr= checkedPages.begin();itr!=checkedPages.end(); itr++)
|
||||
for (std::set<uint32>::iterator itr= checkedPages.begin();itr!=checkedPages.end(); ++itr)
|
||||
ss << *itr << " ";
|
||||
ss << "create(s) a circular reference, which can cause the server to freeze. Changing Next_Page of page "
|
||||
<< pageItr->Page_ID <<" to 0";
|
||||
|
|
@ -5118,7 +5118,7 @@ AreaTrigger const* ObjectMgr::GetGoBackTrigger(uint32 Map) const
|
|||
{
|
||||
const MapEntry *mapEntry = sMapStore.LookupEntry(Map);
|
||||
if(!mapEntry) return NULL;
|
||||
for (AreaTriggerMap::const_iterator itr = mAreaTriggers.begin(); itr != mAreaTriggers.end(); itr++)
|
||||
for (AreaTriggerMap::const_iterator itr = mAreaTriggers.begin(); itr != mAreaTriggers.end(); ++itr)
|
||||
{
|
||||
if(itr->second.target_mapId == mapEntry->entrance_map)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2422,7 +2422,7 @@ void Player::SendInitialSpells()
|
|||
|
||||
uint16 spellCooldowns = m_spellCooldowns.size();
|
||||
data << uint16(spellCooldowns);
|
||||
for(SpellCooldowns::const_iterator itr=m_spellCooldowns.begin(); itr!=m_spellCooldowns.end(); itr++)
|
||||
for(SpellCooldowns::const_iterator itr=m_spellCooldowns.begin(); itr!=m_spellCooldowns.end(); ++itr)
|
||||
{
|
||||
SpellEntry const *sEntry = sSpellStore.LookupEntry(itr->first);
|
||||
if(!sEntry)
|
||||
|
|
@ -3246,7 +3246,7 @@ bool Player::_removeSpell(uint16 spell_id)
|
|||
|
||||
Mail* Player::GetMail(uint32 id)
|
||||
{
|
||||
for(PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end(); itr++)
|
||||
for(PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end(); ++itr)
|
||||
{
|
||||
if ((*itr)->messageID == id)
|
||||
{
|
||||
|
|
@ -5446,7 +5446,7 @@ void Player::SendInitialReputations()
|
|||
|
||||
RepListID a = 0;
|
||||
|
||||
for (FactionStateList::const_iterator itr = m_factions.begin(); itr != m_factions.end(); itr++)
|
||||
for (FactionStateList::const_iterator itr = m_factions.begin(); itr != m_factions.end(); ++itr)
|
||||
{
|
||||
// fill in absent fields
|
||||
for (; a != itr->first; a++)
|
||||
|
|
@ -6402,7 +6402,7 @@ void Player::DuelComplete(DuelCompleteType type)
|
|||
/* remove auras */
|
||||
std::vector<uint32> auras2remove;
|
||||
AuraMap const& vAuras = duel->opponent->GetAuras();
|
||||
for (AuraMap::const_iterator i = vAuras.begin(); i != vAuras.end(); i++)
|
||||
for (AuraMap::const_iterator i = vAuras.begin(); i != vAuras.end(); ++i)
|
||||
{
|
||||
if (!i->second->IsPositive() && i->second->GetCasterGUID() == GetGUID() && i->second->GetAuraApplyTime() >= duel->startTime)
|
||||
auras2remove.push_back(i->second->GetId());
|
||||
|
|
@ -6413,7 +6413,7 @@ void Player::DuelComplete(DuelCompleteType type)
|
|||
|
||||
auras2remove.clear();
|
||||
AuraMap const& auras = GetAuras();
|
||||
for (AuraMap::const_iterator i = auras.begin(); i != auras.end(); i++)
|
||||
for (AuraMap::const_iterator i = auras.begin(); i != auras.end(); ++i)
|
||||
{
|
||||
if (!i->second->IsPositive() && i->second->GetCasterGUID() == duel->opponent->GetGUID() && i->second->GetAuraApplyTime() >= duel->startTime)
|
||||
auras2remove.push_back(i->second->GetId());
|
||||
|
|
@ -15005,13 +15005,13 @@ void Player::SendRaidInfo()
|
|||
|
||||
uint32 counter = 0, i;
|
||||
for(i = 0; i < TOTAL_DIFFICULTIES; i++)
|
||||
for (BoundInstancesMap::iterator itr = m_boundInstances[i].begin(); itr != m_boundInstances[i].end(); itr++)
|
||||
for (BoundInstancesMap::iterator itr = m_boundInstances[i].begin(); itr != m_boundInstances[i].end(); ++itr)
|
||||
if(itr->second.perm) counter++;
|
||||
|
||||
data << counter;
|
||||
for(i = 0; i < TOTAL_DIFFICULTIES; i++)
|
||||
{
|
||||
for (BoundInstancesMap::iterator itr = m_boundInstances[i].begin(); itr != m_boundInstances[i].end(); itr++)
|
||||
for (BoundInstancesMap::iterator itr = m_boundInstances[i].begin(); itr != m_boundInstances[i].end(); ++itr)
|
||||
{
|
||||
if(itr->second.perm)
|
||||
{
|
||||
|
|
@ -15509,7 +15509,7 @@ void Player::_SaveMail()
|
|||
if (!m_mailsLoaded)
|
||||
return;
|
||||
|
||||
for (PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end(); itr++)
|
||||
for (PlayerMails::iterator itr = m_mail.begin(); itr != m_mail.end(); ++itr)
|
||||
{
|
||||
Mail *m = (*itr);
|
||||
if (m->state == MAIL_STATE_CHANGED)
|
||||
|
|
|
|||
|
|
@ -642,7 +642,7 @@ void Spell::FillTargetMap()
|
|||
if(m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Player *me = (Player*)m_caster;
|
||||
for (std::list<Unit*>::const_iterator itr = tmpUnitMap.begin(); itr != tmpUnitMap.end(); itr++)
|
||||
for (std::list<Unit*>::const_iterator itr = tmpUnitMap.begin(); itr != tmpUnitMap.end(); ++itr)
|
||||
{
|
||||
Unit *owner = (*itr)->GetOwner();
|
||||
Unit *u = owner ? owner : (*itr);
|
||||
|
|
@ -4343,7 +4343,7 @@ uint8 Spell::CheckCasterAuras() const
|
|||
{
|
||||
//Checking auras is needed now, because you are prevented by some state but the spell grants immunity.
|
||||
Unit::AuraMap const& auras = m_caster->GetAuras();
|
||||
for(Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); itr++)
|
||||
for(Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
|
||||
{
|
||||
if(itr->second)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2207,7 +2207,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
|||
|
||||
// have a look if there is still some other Lifebloom dummy aura
|
||||
Unit::AuraList auras = m_target->GetAurasByType(SPELL_AURA_DUMMY);
|
||||
for(Unit::AuraList::iterator itr = auras.begin(); itr!=auras.end(); itr++)
|
||||
for(Unit::AuraList::iterator itr = auras.begin(); itr!=auras.end(); ++itr)
|
||||
if((*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID &&
|
||||
(*itr)->GetSpellProto()->SpellFamilyFlags & 0x1000000000LL)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ Unit* HostilReference::getSourceUnit()
|
|||
|
||||
void ThreatContainer::clearReferences()
|
||||
{
|
||||
for(std::list<HostilReference*>::iterator i = iThreatList.begin(); i != iThreatList.end(); i++)
|
||||
for(std::list<HostilReference*>::iterator i = iThreatList.begin(); i != iThreatList.end(); ++i)
|
||||
{
|
||||
(*i)->unlink();
|
||||
delete (*i);
|
||||
|
|
@ -206,7 +206,7 @@ HostilReference* ThreatContainer::getReferenceByTarget(Unit* pVictim)
|
|||
{
|
||||
HostilReference* result = NULL;
|
||||
uint64 guid = pVictim->GetGUID();
|
||||
for(std::list<HostilReference*>::iterator i = iThreatList.begin(); i != iThreatList.end(); i++)
|
||||
for(std::list<HostilReference*>::iterator i = iThreatList.begin(); i != iThreatList.end(); ++i)
|
||||
{
|
||||
if((*i)->getUnitGuid() == guid)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -59,7 +59,12 @@ struct MANGOS_DLL_DECL Traveller
|
|||
template<>
|
||||
inline float Traveller<Creature>::Speed()
|
||||
{
|
||||
return i_traveller.GetSpeed( i_traveller.HasUnitMovementFlag(MOVEMENTFLAG_WALK_MODE) ? MOVE_WALK : MOVE_RUN);
|
||||
if(i_traveller.HasUnitMovementFlag(MOVEMENTFLAG_WALK_MODE))
|
||||
return i_traveller.GetSpeed(MOVE_WALK);
|
||||
else if(i_traveller.HasUnitMovementFlag(MOVEMENTFLAG_FLYING2))
|
||||
return i_traveller.GetSpeed(MOVE_FLY);
|
||||
else
|
||||
return i_traveller.GetSpeed(MOVE_RUN);
|
||||
}
|
||||
|
||||
template<>
|
||||
|
|
|
|||
|
|
@ -353,7 +353,8 @@ enum DeathState
|
|||
JUST_DIED = 1,
|
||||
CORPSE = 2,
|
||||
DEAD = 3,
|
||||
JUST_ALIVED = 4
|
||||
JUST_ALIVED = 4,
|
||||
DEAD_FALLING= 5
|
||||
};
|
||||
|
||||
enum UnitState
|
||||
|
|
|
|||
|
|
@ -125,6 +125,9 @@ World::~World()
|
|||
|
||||
m_weathers.clear();
|
||||
|
||||
while (!cliCmdQueue.empty())
|
||||
delete cliCmdQueue.next();
|
||||
|
||||
VMAP::VMapFactory::clear();
|
||||
|
||||
if(m_resultQueue) delete m_resultQueue;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "6883"
|
||||
#define REVISION_NR "6888"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
|
|
@ -97,8 +97,14 @@ namespace VMAP
|
|||
void VMapFactory::clear()
|
||||
{
|
||||
if(iIgnoreSpellIds)
|
||||
{
|
||||
delete iIgnoreSpellIds;
|
||||
iIgnoreSpellIds = NULL;
|
||||
}
|
||||
if(gVMapManager)
|
||||
{
|
||||
delete gVMapManager;
|
||||
gVMapManager = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue