Core: More codestyle cleanups
This commit is contained in:
@@ -1003,14 +1003,14 @@ void Creature::SetLootRecipient(Unit *unit)
|
||||
return;
|
||||
|
||||
m_lootRecipient = player->GetGUID();
|
||||
if (Group *group = player->GetGroup())
|
||||
if (Group* group = player->GetGroup())
|
||||
m_lootRecipientGroup = group->GetLowGUID();
|
||||
|
||||
SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED);
|
||||
}
|
||||
|
||||
// return true if this creature is tapped by the player or by a member of his group.
|
||||
bool Creature::isTappedBy(Player *player) const
|
||||
bool Creature::isTappedBy(Player* player) const
|
||||
{
|
||||
if (player->GetGUID() == m_lootRecipient)
|
||||
return true;
|
||||
@@ -1441,7 +1441,7 @@ bool Creature::canStartAttack(Unit const* who, bool force) const
|
||||
return false;
|
||||
|
||||
if (who->isInCombat())
|
||||
if (Unit *victim = who->getAttackerForHelper())
|
||||
if (Unit* victim = who->getAttackerForHelper())
|
||||
if (IsWithinDistInMap(victim, sWorld->getFloatConfig(CONFIG_CREATURE_FAMILY_ASSISTANCE_RADIUS)))
|
||||
force = true;
|
||||
|
||||
@@ -1794,7 +1794,7 @@ Unit* Creature::SelectNearestTarget(float dist) const
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
Unit *target = NULL;
|
||||
Unit* target = NULL;
|
||||
|
||||
{
|
||||
if (dist == 0.0f)
|
||||
@@ -1821,7 +1821,7 @@ Unit* Creature::SelectNearestTargetInAttackDistance(float dist) const
|
||||
cell.data.Part.reserved = ALL_DISTRICT;
|
||||
cell.SetNoCreate();
|
||||
|
||||
Unit *target = NULL;
|
||||
Unit* target = NULL;
|
||||
|
||||
if (dist > ATTACK_DISTANCE)
|
||||
sLog->outError("Creature (GUID: %u Entry: %u) SelectNearestTargetInAttackDistance called with dist > ATTACK_DISTANCE. Extra distance ignored.", GetGUIDLow(), GetEntry());
|
||||
@@ -1957,7 +1957,7 @@ bool Creature::CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction /
|
||||
|
||||
// use this function to avoid having hostile creatures attack
|
||||
// friendlies and other mobs they shouldn't attack
|
||||
bool Creature::_IsTargetAcceptable(const Unit *target) const
|
||||
bool Creature::_IsTargetAcceptable(const Unit* target) const
|
||||
{
|
||||
ASSERT(target);
|
||||
|
||||
@@ -1977,7 +1977,7 @@ bool Creature::_IsTargetAcceptable(const Unit *target) const
|
||||
}
|
||||
|
||||
const Unit *myVictim = getAttackerForHelper();
|
||||
const Unit *targetVictim = target->getAttackerForHelper();
|
||||
const Unit* targetVictim = target->getAttackerForHelper();
|
||||
|
||||
// if I'm already fighting target, or I'm hostile towards the target, the target is acceptable
|
||||
if (myVictim == target || targetVictim == this || IsHostileTo(target))
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
CreatureGroupInfoType CreatureGroupMap;
|
||||
|
||||
void CreatureGroupManager::AddCreatureToGroup(uint32 groupId, Creature *member)
|
||||
void CreatureGroupManager::AddCreatureToGroup(uint32 groupId, Creature* member)
|
||||
{
|
||||
Map *map = member->FindMap();
|
||||
if (!map)
|
||||
@@ -50,7 +50,7 @@ void CreatureGroupManager::AddCreatureToGroup(uint32 groupId, Creature *member)
|
||||
}
|
||||
}
|
||||
|
||||
void CreatureGroupManager::RemoveCreatureFromGroup(CreatureGroup *group, Creature *member)
|
||||
void CreatureGroupManager::RemoveCreatureFromGroup(CreatureGroup* group, Creature* member)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_UNITS, "Deleting member pointer to GUID: %u from group %u", group->GetId(), member->GetDBTableGUIDLow());
|
||||
group->RemoveMember(member);
|
||||
@@ -151,7 +151,7 @@ void CreatureGroupManager::LoadCreatureFormations()
|
||||
sLog->outString();
|
||||
}
|
||||
|
||||
void CreatureGroup::AddMember(Creature *member)
|
||||
void CreatureGroup::AddMember(Creature* member)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_UNITS, "CreatureGroup::AddMember: Adding unit GUID: %u.", member->GetGUIDLow());
|
||||
|
||||
@@ -166,7 +166,7 @@ void CreatureGroup::AddMember(Creature *member)
|
||||
member->SetFormation(this);
|
||||
}
|
||||
|
||||
void CreatureGroup::RemoveMember(Creature *member)
|
||||
void CreatureGroup::RemoveMember(Creature* member)
|
||||
{
|
||||
if (m_leader == member)
|
||||
m_leader = NULL;
|
||||
@@ -175,7 +175,7 @@ void CreatureGroup::RemoveMember(Creature *member)
|
||||
member->SetFormation(NULL);
|
||||
}
|
||||
|
||||
void CreatureGroup::MemberAttackStart(Creature *member, Unit *target)
|
||||
void CreatureGroup::MemberAttackStart(Creature* member, Unit* target)
|
||||
{
|
||||
uint8 groupAI = CreatureGroupMap[member->GetDBTableGUIDLow()]->groupAI;
|
||||
if (!groupAI)
|
||||
@@ -229,7 +229,7 @@ void CreatureGroup::LeaderMoveTo(float x, float y, float z)
|
||||
|
||||
for (CreatureGroupMemberType::iterator itr = m_members.begin(); itr != m_members.end(); ++itr)
|
||||
{
|
||||
Creature *member = itr->first;
|
||||
Creature* member = itr->first;
|
||||
if (member == m_leader || !member->isAlive() || member->getVictim())
|
||||
continue;
|
||||
|
||||
|
||||
@@ -702,7 +702,7 @@ void Item::SetState(ItemUpdateState state, Player *forplayer)
|
||||
}
|
||||
}
|
||||
|
||||
void Item::AddToUpdateQueueOf(Player *player)
|
||||
void Item::AddToUpdateQueueOf(Player* player)
|
||||
{
|
||||
if (IsInUpdateQueue())
|
||||
return;
|
||||
@@ -722,7 +722,7 @@ void Item::AddToUpdateQueueOf(Player *player)
|
||||
uQueuePos = player->m_itemUpdateQueue.size()-1;
|
||||
}
|
||||
|
||||
void Item::RemoveFromUpdateQueueOf(Player *player)
|
||||
void Item::RemoveFromUpdateQueueOf(Player* player)
|
||||
{
|
||||
if (!IsInUpdateQueue())
|
||||
return;
|
||||
|
||||
@@ -301,7 +301,7 @@ void Object::_BuildMovementUpdate(ByteBuffer * data, uint16 flags) const
|
||||
{
|
||||
//WPAssert(this->ToPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE);
|
||||
|
||||
Player *player = const_cast<Object*>(this)->ToPlayer();
|
||||
Player* player = const_cast<Object*>(this)->ToPlayer();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
@@ -450,7 +450,7 @@ void Object::_BuildMovementUpdate(ByteBuffer * data, uint16 flags) const
|
||||
// 0x4
|
||||
if (flags & UPDATEFLAG_HAS_TARGET) // packed guid (current target guid)
|
||||
{
|
||||
if (Unit *victim = ((Unit*)this)->getVictim())
|
||||
if (Unit* victim = ((Unit*)this)->getVictim())
|
||||
data->append(victim->GetPackGUID());
|
||||
else
|
||||
*data << uint8(0);
|
||||
@@ -1982,7 +1982,7 @@ void WorldObject::MonsterTextEmote(int32 textId, uint64 TargetGuid, bool IsBossE
|
||||
|
||||
void WorldObject::MonsterWhisper(const char* text, uint64 receiver, bool IsBossWhisper)
|
||||
{
|
||||
Player *player = sObjectMgr->GetPlayer(receiver);
|
||||
Player* player = sObjectMgr->GetPlayer(receiver);
|
||||
if (!player || !player->GetSession())
|
||||
return;
|
||||
|
||||
@@ -1996,7 +1996,7 @@ void WorldObject::MonsterWhisper(const char* text, uint64 receiver, bool IsBossW
|
||||
|
||||
void WorldObject::MonsterWhisper(int32 textId, uint64 receiver, bool IsBossWhisper)
|
||||
{
|
||||
Player *player = sObjectMgr->GetPlayer(receiver);
|
||||
Player* player = sObjectMgr->GetPlayer(receiver);
|
||||
if (!player || !player->GetSession())
|
||||
return;
|
||||
|
||||
|
||||
@@ -1572,7 +1572,7 @@ bool Pet::resetTalents()
|
||||
if (!pet_family || pet_family->petTalentType < 0)
|
||||
return false;
|
||||
|
||||
Player *player = owner->ToPlayer();
|
||||
Player* player = owner->ToPlayer();
|
||||
|
||||
uint8 level = getLevel();
|
||||
uint32 talentPointsForLevel = GetMaxTalentPointsForLevel(level);
|
||||
|
||||
@@ -2926,7 +2926,7 @@ void Player::SendLogXPGain(uint32 GivenXP, Unit* victim, uint32 BonusXP, bool re
|
||||
GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
void Player::GiveXP(uint32 xp, Unit *victim, float group_rate)
|
||||
void Player::GiveXP(uint32 xp, Unit* victim, float group_rate)
|
||||
{
|
||||
if (xp < 1)
|
||||
return;
|
||||
@@ -8175,7 +8175,7 @@ void Player::UpdateEquipSpellsAtFormChange()
|
||||
}
|
||||
}
|
||||
}
|
||||
void Player::CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32 procVictim, uint32 procEx)
|
||||
void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32 procVictim, uint32 procEx)
|
||||
{
|
||||
if (!target || !target->isAlive() || target == this)
|
||||
return;
|
||||
@@ -8211,7 +8211,7 @@ void Player::CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32
|
||||
}
|
||||
}
|
||||
|
||||
void Player::CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32 procVictim, uint32 procEx, Item *item, ItemTemplate const* proto)
|
||||
void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32 procVictim, uint32 procEx, Item *item, ItemTemplate const* proto)
|
||||
{
|
||||
// Can do effect if any damage done to target
|
||||
if (procVictim & PROC_FLAG_TAKEN_DAMAGE)
|
||||
@@ -8349,7 +8349,7 @@ void Player::CastItemUseSpell(Item *item, SpellCastTargets const& targets, uint8
|
||||
return;
|
||||
}
|
||||
|
||||
Spell *spell = new Spell(this, spellInfo, false);
|
||||
Spell* spell = new Spell(this, spellInfo, false);
|
||||
spell->m_CastItem = item;
|
||||
spell->m_cast_count = cast_count; //set count of casts
|
||||
spell->SetSpellValue(SPELLVALUE_BASE_POINT0, learning_spell_id);
|
||||
@@ -8380,7 +8380,7 @@ void Player::CastItemUseSpell(Item *item, SpellCastTargets const& targets, uint8
|
||||
continue;
|
||||
}
|
||||
|
||||
Spell *spell = new Spell(this, spellInfo, (count > 0));
|
||||
Spell* spell = new Spell(this, spellInfo, (count > 0));
|
||||
spell->m_CastItem = item;
|
||||
spell->m_cast_count = cast_count; // set count of casts
|
||||
spell->m_glyphIndex = glyphIndex; // glyph index
|
||||
@@ -8408,7 +8408,7 @@ void Player::CastItemUseSpell(Item *item, SpellCastTargets const& targets, uint8
|
||||
continue;
|
||||
}
|
||||
|
||||
Spell *spell = new Spell(this, spellInfo, (count > 0));
|
||||
Spell* spell = new Spell(this, spellInfo, (count > 0));
|
||||
spell->m_CastItem = item;
|
||||
spell->m_cast_count = cast_count; // set count of casts
|
||||
spell->m_glyphIndex = glyphIndex; // glyph index
|
||||
@@ -15730,7 +15730,7 @@ void Player::KilledMonsterCredit(uint32 entry, uint64 guid)
|
||||
uint32 real_entry = entry;
|
||||
if (guid)
|
||||
{
|
||||
Creature *killed = GetMap()->GetCreature(guid);
|
||||
Creature* killed = GetMap()->GetCreature(guid);
|
||||
if (killed && killed->GetEntry())
|
||||
real_entry = killed->GetEntry();
|
||||
}
|
||||
@@ -17760,7 +17760,7 @@ void Player::_LoadBoundInstances(PreparedQueryResult result)
|
||||
for (uint8 i = 0; i < MAX_DIFFICULTY; ++i)
|
||||
m_boundInstances[i].clear();
|
||||
|
||||
Group *group = GetGroup();
|
||||
Group* group = GetGroup();
|
||||
|
||||
//QueryResult *result = CharacterDatabase.PQuery("SELECT id, permanent, map, difficulty, resettime FROM character_instance LEFT JOIN instance ON instance = id WHERE guid = '%u'", GUID_LOPART(m_guid));
|
||||
if (result)
|
||||
@@ -17836,7 +17836,7 @@ InstanceSave * Player::GetInstanceSave(uint32 mapid, bool raid)
|
||||
InstancePlayerBind *pBind = GetBoundInstance(mapid, GetDifficulty(raid));
|
||||
InstanceSave *pSave = pBind ? pBind->save : NULL;
|
||||
if (!pBind || !pBind->perm)
|
||||
if (Group *group = GetGroup())
|
||||
if (Group* group = GetGroup())
|
||||
if (InstanceGroupBind *groupBind = group->GetBoundInstance(this))
|
||||
pSave = groupBind->save;
|
||||
|
||||
@@ -17980,7 +17980,7 @@ void Player::SendSavedInstances()
|
||||
}
|
||||
|
||||
/// convert the player's binds to the group
|
||||
void Player::ConvertInstancesToGroup(Player *player, Group *group, bool switchLeader)
|
||||
void Player::ConvertInstancesToGroup(Player* player, Group* group, bool switchLeader)
|
||||
{
|
||||
// copy all binds to the group, when changing leader it's assumed the character
|
||||
// will not have any solo binds
|
||||
@@ -18929,7 +18929,7 @@ void Player::SendAttackSwingBadFacingAttack()
|
||||
GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
void Player::SendAutoRepeatCancel(Unit *target)
|
||||
void Player::SendAutoRepeatCancel(Unit* target)
|
||||
{
|
||||
WorldPacket data(SMSG_CANCEL_AUTO_REPEAT, target->GetPackGUID().size());
|
||||
data.append(target->GetPackGUID()); // may be it's target guid
|
||||
@@ -19601,7 +19601,7 @@ void Player::AddSpellMod(SpellModifier* mod, bool apply)
|
||||
}
|
||||
|
||||
// Restore spellmods in case of failed cast
|
||||
void Player::RestoreSpellMods(Spell *spell, uint32 ownerAuraId)
|
||||
void Player::RestoreSpellMods(Spell* spell, uint32 ownerAuraId)
|
||||
{
|
||||
if (!spell || spell->m_appliedMods.empty())
|
||||
return;
|
||||
@@ -21295,7 +21295,7 @@ void Player::ClearComboPoints()
|
||||
m_comboTarget = 0;
|
||||
}
|
||||
|
||||
void Player::SetGroup(Group *group, int8 subgroup)
|
||||
void Player::SetGroup(Group* group, int8 subgroup)
|
||||
{
|
||||
if (group == NULL)
|
||||
m_group.unlink();
|
||||
@@ -21701,7 +21701,7 @@ void Player::learnSkillRewardedSpells(uint32 skill_id, uint32 skill_value)
|
||||
}
|
||||
}
|
||||
|
||||
void Player::SendAurasForTarget(Unit *target)
|
||||
void Player::SendAurasForTarget(Unit* target)
|
||||
{
|
||||
if (!target || target->GetVisibleAuras()->empty()) // speedup things
|
||||
return;
|
||||
@@ -22173,7 +22173,7 @@ bool Player::GetsRecruitAFriendBonus(bool forXP)
|
||||
bool recruitAFriend = false;
|
||||
if (getLevel() <= sWorld->getIntConfig(CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL) || !forXP)
|
||||
{
|
||||
if (Group *group = this->GetGroup())
|
||||
if (Group* group = this->GetGroup())
|
||||
{
|
||||
for (GroupReference *itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
|
||||
{
|
||||
@@ -22551,7 +22551,7 @@ void Player::RemoveFromBattlegroundRaid()
|
||||
SetOriginalGroup(NULL);
|
||||
}
|
||||
|
||||
void Player::SetOriginalGroup(Group *group, int8 subgroup)
|
||||
void Player::SetOriginalGroup(Group* group, int8 subgroup)
|
||||
{
|
||||
if (group == NULL)
|
||||
m_originalGroup.unlink();
|
||||
@@ -22882,7 +22882,7 @@ void Player::UpdateCharmedAI()
|
||||
if (!charmer->isInCombat())
|
||||
GetMotionMaster()->MoveFollow(charmer, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
|
||||
|
||||
Unit *target = getVictim();
|
||||
Unit* target = getVictim();
|
||||
if (!target || !charmer->canAttack(target))
|
||||
{
|
||||
target = charmer->SelectNearestTarget();
|
||||
@@ -22894,7 +22894,7 @@ void Player::UpdateCharmedAI()
|
||||
}
|
||||
}
|
||||
|
||||
void Player::AddGlobalCooldown(SpellEntry const *spellInfo, Spell *spell)
|
||||
void Player::AddGlobalCooldown(SpellEntry const *spellInfo, Spell* spell)
|
||||
{
|
||||
if (!spellInfo || !spellInfo->StartRecoveryTime)
|
||||
return;
|
||||
|
||||
@@ -171,7 +171,7 @@ SocialMgr::~SocialMgr()
|
||||
{
|
||||
}
|
||||
|
||||
void SocialMgr::GetFriendInfo(Player *player, uint32 friendGUID, FriendInfo &friendInfo)
|
||||
void SocialMgr::GetFriendInfo(Player* player, uint32 friendGUID, FriendInfo &friendInfo)
|
||||
{
|
||||
if (!player)
|
||||
return;
|
||||
@@ -219,7 +219,7 @@ void SocialMgr::MakeFriendStatusPacket(FriendsResult result, uint32 guid, WorldP
|
||||
*data << uint64(guid);
|
||||
}
|
||||
|
||||
void SocialMgr::SendFriendStatus(Player *player, FriendsResult result, uint32 friend_guid, bool broadcast)
|
||||
void SocialMgr::SendFriendStatus(Player* player, FriendsResult result, uint32 friend_guid, bool broadcast)
|
||||
{
|
||||
FriendInfo fi;
|
||||
|
||||
@@ -255,7 +255,7 @@ void SocialMgr::SendFriendStatus(Player *player, FriendsResult result, uint32 fr
|
||||
player->GetSession()->SendPacket(&data);
|
||||
}
|
||||
|
||||
void SocialMgr::BroadcastToFriendListers(Player *player, WorldPacket *packet)
|
||||
void SocialMgr::BroadcastToFriendListers(Player* player, WorldPacket *packet)
|
||||
{
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
@@ -403,7 +403,7 @@ void Unit::SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint32 T
|
||||
AddUnitState(UNIT_STAT_MOVE);
|
||||
}
|
||||
|
||||
void Unit::SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint32 MoveFlags, uint32 time, float speedZ, Player *player)
|
||||
void Unit::SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint32 MoveFlags, uint32 time, float speedZ, Player* player)
|
||||
{
|
||||
WorldPacket data(SMSG_MONSTER_MOVE, 12+4+1+4+4+4+12+GetPackGUID().size());
|
||||
data.append(GetPackGUID());
|
||||
@@ -675,7 +675,7 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
|
||||
|
||||
if (GetTypeId() == TYPEID_PLAYER && this != pVictim)
|
||||
{
|
||||
Player *killer = this->ToPlayer();
|
||||
Player* killer = this->ToPlayer();
|
||||
|
||||
// in bg, count dmg if victim is also a player
|
||||
if (pVictim->GetTypeId() == TYPEID_PLAYER)
|
||||
@@ -853,7 +853,7 @@ void Unit::CastSpell(Unit* Victim, SpellEntry const *spellInfo, bool triggered,
|
||||
if (!originalCaster && triggeredByAura)
|
||||
originalCaster = triggeredByAura->GetCasterGUID();
|
||||
|
||||
Spell *spell = new Spell(this, spellInfo, triggered, originalCaster);
|
||||
Spell* spell = new Spell(this, spellInfo, triggered, originalCaster);
|
||||
|
||||
spell->m_CastItem = castItem;
|
||||
spell->prepare(&targets, triggeredByAura);
|
||||
@@ -893,7 +893,7 @@ void Unit::CastCustomSpell(uint32 spellId, CustomSpellValues const &value, Unit*
|
||||
if (!originalCaster && triggeredByAura)
|
||||
originalCaster = triggeredByAura->GetCasterGUID();
|
||||
|
||||
Spell *spell = new Spell(this, spellInfo, triggered, originalCaster);
|
||||
Spell* spell = new Spell(this, spellInfo, triggered, originalCaster);
|
||||
|
||||
if (castItem)
|
||||
{
|
||||
@@ -924,7 +924,7 @@ void Unit::CastSpell(float x, float y, float z, uint32 spellId, bool triggered,
|
||||
if (!originalCaster && triggeredByAura)
|
||||
originalCaster = triggeredByAura->GetCasterGUID();
|
||||
|
||||
Spell *spell = new Spell(this, spellInfo, triggered, originalCaster);
|
||||
Spell* spell = new Spell(this, spellInfo, triggered, originalCaster);
|
||||
|
||||
SpellCastTargets targets;
|
||||
targets.setDst(x, y, z, GetOrientation());
|
||||
@@ -960,7 +960,7 @@ void Unit::CastSpell(GameObject *go, uint32 spellId, bool triggered, Item *castI
|
||||
if (!originalCaster && triggeredByAura)
|
||||
originalCaster = triggeredByAura->GetCasterGUID();
|
||||
|
||||
Spell *spell = new Spell(this, spellInfo, triggered, originalCaster);
|
||||
Spell* spell = new Spell(this, spellInfo, triggered, originalCaster);
|
||||
|
||||
SpellCastTargets targets;
|
||||
targets.setGOTarget(go);
|
||||
@@ -2973,7 +2973,7 @@ void Unit::InterruptSpell(CurrentSpellTypes spellType, bool withDelayed, bool wi
|
||||
ASSERT(spellType < CURRENT_MAX_SPELL);
|
||||
|
||||
//sLog->outDebug(LOG_FILTER_UNITS, "Interrupt spell for unit %u.", GetEntry());
|
||||
Spell *spell = m_currentSpells[spellType];
|
||||
Spell* spell = m_currentSpells[spellType];
|
||||
if (spell
|
||||
&& (withDelayed || spell->getState() != SPELL_STATE_DELAYED)
|
||||
&& (withInstant || spell->GetCastTime() > 0))
|
||||
@@ -4789,7 +4789,7 @@ void Unit::SendSpellNonMeleeDamageLog(SpellNonMeleeDamage *log)
|
||||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
void Unit::SendSpellNonMeleeDamageLog(Unit *target, uint32 SpellID, uint32 Damage, SpellSchoolMask damageSchoolMask, uint32 AbsorbedDamage, uint32 Resist, bool PhysicalDamage, uint32 Blocked, bool CriticalHit)
|
||||
void Unit::SendSpellNonMeleeDamageLog(Unit* target, uint32 SpellID, uint32 Damage, SpellSchoolMask damageSchoolMask, uint32 AbsorbedDamage, uint32 Resist, bool PhysicalDamage, uint32 Blocked, bool CriticalHit)
|
||||
{
|
||||
SpellNonMeleeDamage log(this, target, SpellID, damageSchoolMask);
|
||||
log.damage = Damage - AbsorbedDamage - Resist - Blocked;
|
||||
@@ -4860,7 +4860,7 @@ void Unit::SendPeriodicAuraLog(SpellPeriodicAuraLogInfo *pInfo)
|
||||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
void Unit::SendSpellMiss(Unit *target, uint32 spellID, SpellMissInfo missInfo)
|
||||
void Unit::SendSpellMiss(Unit* target, uint32 spellID, SpellMissInfo missInfo)
|
||||
{
|
||||
WorldPacket data(SMSG_SPELLLOGMISS, (4+8+1+4+8+1));
|
||||
data << uint32(spellID);
|
||||
@@ -4947,7 +4947,7 @@ void Unit::SendAttackStateUpdate(CalcDamageInfo *damageInfo)
|
||||
SendMessageToSet(&data, true);
|
||||
}
|
||||
|
||||
void Unit::SendAttackStateUpdate(uint32 HitInfo, Unit *target, uint8 /*SwingType*/, SpellSchoolMask damageSchoolMask, uint32 Damage, uint32 AbsorbDamage, uint32 Resist, VictimState TargetState, uint32 BlockedAmount)
|
||||
void Unit::SendAttackStateUpdate(uint32 HitInfo, Unit* target, uint8 /*SwingType*/, SpellSchoolMask damageSchoolMask, uint32 Damage, uint32 AbsorbDamage, uint32 Resist, VictimState TargetState, uint32 BlockedAmount)
|
||||
{
|
||||
CalcDamageInfo dmgInfo;
|
||||
dmgInfo.HitInfo = HitInfo;
|
||||
@@ -9156,7 +9156,7 @@ FactionTemplateEntry const* Unit::getFactionTemplateEntry() const
|
||||
|
||||
if (GetGUID() != guid)
|
||||
{
|
||||
if (const Player *player = ToPlayer())
|
||||
if (const Player* player = ToPlayer())
|
||||
sLog->outError("Player %s has invalid faction (faction template id) #%u", player->GetName(), getFaction());
|
||||
else if (const Creature *creature = ToCreature())
|
||||
sLog->outError("Creature (template id: %u) has invalid faction (faction template id) #%u", creature->GetCreatureInfo()->Entry, getFaction());
|
||||
@@ -9427,7 +9427,7 @@ bool Unit::IsNeutralToAll() const
|
||||
return my_faction->IsNeutralToAll();
|
||||
}
|
||||
|
||||
bool Unit::Attack(Unit *victim, bool meleeAttack)
|
||||
bool Unit::Attack(Unit* victim, bool meleeAttack)
|
||||
{
|
||||
if (!victim || victim == this)
|
||||
return false;
|
||||
@@ -9999,7 +9999,7 @@ void Unit::SetCharm(Unit* charm, bool apply)
|
||||
charm->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
|
||||
charm->ToPlayer()->UpdatePvPState();
|
||||
}
|
||||
else if (Player *player = charm->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
else if (Player* player = charm->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
{
|
||||
charm->m_ControlledByPlayer = true;
|
||||
charm->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
|
||||
@@ -10058,7 +10058,7 @@ int32 Unit::DealHeal(Unit *pVictim, uint32 addhealth)
|
||||
return gain;
|
||||
}
|
||||
|
||||
Unit* Unit::SelectMagnetTarget(Unit *victim, SpellEntry const *spellInfo)
|
||||
Unit* Unit::SelectMagnetTarget(Unit* victim, SpellEntry const *spellInfo)
|
||||
{
|
||||
if (!victim)
|
||||
return NULL;
|
||||
@@ -10115,7 +10115,7 @@ void Unit::RemoveAllControlled()
|
||||
|
||||
while (!m_Controlled.empty())
|
||||
{
|
||||
Unit *target = *m_Controlled.begin();
|
||||
Unit* target = *m_Controlled.begin();
|
||||
m_Controlled.erase(m_Controlled.begin());
|
||||
if (target->GetCharmerGUID() == GetGUID())
|
||||
target->RemoveCharmAuras();
|
||||
@@ -12744,7 +12744,7 @@ void Unit::TauntApply(Unit* taunter)
|
||||
if (this->ToCreature()->HasReactState(REACT_PASSIVE))
|
||||
return;
|
||||
|
||||
Unit *target = getVictim();
|
||||
Unit* target = getVictim();
|
||||
if (target && target == taunter)
|
||||
return;
|
||||
|
||||
@@ -12770,7 +12770,7 @@ void Unit::TauntFadeOut(Unit *taunter)
|
||||
if (this->ToCreature()->HasReactState(REACT_PASSIVE))
|
||||
return;
|
||||
|
||||
Unit *target = getVictim();
|
||||
Unit* target = getVictim();
|
||||
if (!target || target != taunter)
|
||||
return;
|
||||
|
||||
@@ -15134,7 +15134,7 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue(AuraEffect *triggeredByAura)
|
||||
if (Player* modOwner = caster->GetSpellModOwner())
|
||||
modOwner->ApplySpellMod(spellProto->Id, SPELLMOD_RADIUS, radius, NULL);
|
||||
|
||||
if (Unit *target = GetNextRandomRaidMemberOrPet(radius))
|
||||
if (Unit* target = GetNextRandomRaidMemberOrPet(radius))
|
||||
{
|
||||
CastCustomSpell(target, spellProto->Id, &heal, NULL, NULL, true, NULL, triggeredByAura, caster_guid);
|
||||
if (Aura * aura = target->GetAura(spellProto->Id, caster->GetGUID()))
|
||||
@@ -15247,7 +15247,7 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
|
||||
|
||||
Player* looter = player;
|
||||
|
||||
if (Group *group = player->GetGroup())
|
||||
if (Group* group = player->GetGroup())
|
||||
{
|
||||
group->BroadcastPacket(&data, group->GetMemberGroup(player->GetGUID()));
|
||||
|
||||
@@ -15472,8 +15472,8 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
|
||||
}
|
||||
else if (victim->GetTypeId() == TYPEID_UNIT)
|
||||
{
|
||||
Player *killer = this->ToPlayer();
|
||||
Creature *killed = victim->ToCreature();
|
||||
Player* killer = this->ToPlayer();
|
||||
Creature* killed = victim->ToCreature();
|
||||
sScriptMgr->OnCreatureKill(killer, killed);
|
||||
}
|
||||
}
|
||||
@@ -15481,8 +15481,8 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
Creature *killer = this->ToCreature();
|
||||
Player *killed = victim->ToPlayer();
|
||||
Creature* killer = this->ToCreature();
|
||||
Player* killed = victim->ToPlayer();
|
||||
sScriptMgr->OnPlayerKilledByCreature(killer, killed);
|
||||
}
|
||||
}
|
||||
@@ -16165,7 +16165,7 @@ void Unit::GetPartyMembers(std::list<Unit*> &TagUnitMap)
|
||||
}
|
||||
}
|
||||
|
||||
Aura * Unit::AddAura(uint32 spellId, Unit *target)
|
||||
Aura * Unit::AddAura(uint32 spellId, Unit* target)
|
||||
{
|
||||
if (!target)
|
||||
return NULL;
|
||||
@@ -16180,7 +16180,7 @@ Aura * Unit::AddAura(uint32 spellId, Unit *target)
|
||||
return AddAura(spellInfo, MAX_EFFECT_MASK, target);
|
||||
}
|
||||
|
||||
Aura * Unit::AddAura(SpellEntry const *spellInfo, uint8 effMask, Unit *target)
|
||||
Aura * Unit::AddAura(SpellEntry const *spellInfo, uint8 effMask, Unit* target)
|
||||
{
|
||||
if (!spellInfo)
|
||||
return NULL;
|
||||
@@ -16204,7 +16204,7 @@ Aura * Unit::AddAura(SpellEntry const *spellInfo, uint8 effMask, Unit *target)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void Unit::SetAuraStack(uint32 spellId, Unit *target, uint32 stack)
|
||||
void Unit::SetAuraStack(uint32 spellId, Unit* target, uint32 stack)
|
||||
{
|
||||
Aura *aura = target->GetAura(spellId, GetGUID());
|
||||
if (!aura)
|
||||
@@ -16363,7 +16363,7 @@ void Unit::UpdateObjectVisibility(bool forced)
|
||||
|
||||
void Unit::KnockbackFrom(float x, float y, float speedXY, float speedZ)
|
||||
{
|
||||
Player *player = NULL;
|
||||
Player* player = NULL;
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
player = (Player*)this;
|
||||
else if (GetCharmer())
|
||||
@@ -16746,7 +16746,7 @@ bool Unit::HandleSpellClick(Unit* clicker, int8 seatId)
|
||||
if (itr->second.IsFitToRequirements(clicker, this))
|
||||
{
|
||||
Unit *caster = (itr->second.castFlags & NPC_CLICK_CAST_CASTER_CLICKER) ? clicker : this;
|
||||
Unit *target = (itr->second.castFlags & NPC_CLICK_CAST_TARGET_CLICKER) ? clicker : this;
|
||||
Unit* target = (itr->second.castFlags & NPC_CLICK_CAST_TARGET_CLICKER) ? clicker : this;
|
||||
uint64 origCasterGUID = (itr->second.castFlags & NPC_CLICK_CAST_ORIG_CASTER_OWNER) ? GetOwnerGUID() : clicker->GetGUID();
|
||||
|
||||
SpellEntry const* spellEntry = sSpellStore.LookupEntry(itr->second.spellId);
|
||||
|
||||
Reference in New Issue
Block a user