mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-01 10:03:47 +00:00
fix(Core/Creature): Fixed GroupAI flags usage in creature_formations (#7544)
* fix(Core/Creature): Fixed GroupAI flags usage * fix(Core/Creature): build fix + code style... * fix(Core/Creatures): trailing white spaces... * Core/Formations: allow only certain members to have follow formation * Core/Formations: fixed ancient data corruption in CreatureGroup::LeaderMoveTo * Core/Formations: minor optimization * Core/Formations: improved some warning messages * Core/Formations: do not load invalid formation data which has unsupported group ai * Core/Formations: minor adjust for recent commit * Core/Formations: log formation data which has angle and distance but dont have GROUP_AI_FLAG_FOLLOW_LEADER flag * Core/Formations: Minor optimization for formation data handling * Core/Formations: make sure that FormationInfo members are always initialized on its creation * Core/Formations: minor warnings adjustments * DB/Formations: fixed some warnings * Core/Formations: check group flags only if there is any I have gues that maybe leader could not assist any member at all but members maybe could be linked for motion * DB/Formations: fixed rest of DB warnings * Core/Formations: more improvements for supported AI mask check * Core/Formations: more improvements for data checks * DB/Formations: fixed warnings * meh * DB/Formations: minor correction * Core/Formations: code style - brackets, you suck... :D
This commit is contained in:
@@ -270,15 +270,21 @@ void Creature::DisappearAndDie()
|
||||
void Creature::SearchFormation()
|
||||
{
|
||||
if (IsSummon())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ObjectGuid::LowType spawnId = GetSpawnId();
|
||||
if (!spawnId)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
CreatureGroupInfoType::iterator frmdata = sFormationMgr->CreatureGroupMap.find(spawnId);
|
||||
CreatureGroupInfoType::const_iterator frmdata = sFormationMgr->CreatureGroupMap.find(spawnId);
|
||||
if (frmdata != sFormationMgr->CreatureGroupMap.end())
|
||||
sFormationMgr->AddCreatureToGroup(frmdata->second->leaderGUID, this);
|
||||
{
|
||||
sFormationMgr->AddCreatureToGroup(frmdata->second.leaderGUID, this);
|
||||
}
|
||||
}
|
||||
|
||||
void Creature::RemoveCorpse(bool setSpawnTime, bool skipVisibility)
|
||||
|
||||
Reference in New Issue
Block a user