mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
Eliminated tabs!
Eliminated tabs!
This commit is contained in:
parent
0f19fec851
commit
942dd64a53
27 changed files with 247 additions and 247 deletions
|
|
@ -53,7 +53,7 @@ void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket& recv_data)
|
||||||
if (!pCreature)
|
if (!pCreature)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!pCreature->IsBattleMaster()) // it's not battlemaster
|
if (!pCreature->IsBattleMaster()) // it's not battlemaster
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Stop the npc if moving
|
// Stop the npc if moving
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ bool ChatHandler::HandleServerInfoCommand(char* /*args*/)
|
||||||
std::string str = secsToTimeString(sWorld.GetUptime());
|
std::string str = secsToTimeString(sWorld.GetUptime());
|
||||||
|
|
||||||
char const* full;
|
char const* full;
|
||||||
full = REVISION_NR;
|
full = REVISION_NR;
|
||||||
SendSysMessage(full);
|
SendSysMessage(full);
|
||||||
|
|
||||||
if (sScriptMgr.IsScriptLibraryLoaded())
|
if (sScriptMgr.IsScriptLibraryLoaded())
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ void AggressorAI::EnterEvadeMode()
|
||||||
// i_tracker.Reset(TIME_INTERVAL_LOOK);
|
// i_tracker.Reset(TIME_INTERVAL_LOOK);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_creature->IsCharmed())
|
if (!m_creature->IsCharmed())
|
||||||
{
|
{
|
||||||
m_creature->RemoveAllAurasOnEvade();
|
m_creature->RemoveAllAurasOnEvade();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -901,7 +901,7 @@ bool Creature::IsTrainerOf(Player* pPlayer, bool msg) const
|
||||||
|
|
||||||
bool Creature::CanInteractWithBattleMaster(Player* pPlayer, bool msg) const
|
bool Creature::CanInteractWithBattleMaster(Player* pPlayer, bool msg) const
|
||||||
{
|
{
|
||||||
if (!IsBattleMaster())
|
if (!IsBattleMaster())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
BattleGroundTypeId bgTypeId = sBattleGroundMgr.GetBattleMasterBG(GetEntry());
|
BattleGroundTypeId bgTypeId = sBattleGroundMgr.GetBattleMasterBG(GetEntry());
|
||||||
|
|
@ -1637,14 +1637,14 @@ bool Creature::IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectInd
|
||||||
// return true if this creature is tapped by the player or by a member of his group.
|
// return true if this creature is tapped by the player or by a member of his group.
|
||||||
bool Creature::IsTappedBy(Player const* player) const
|
bool Creature::IsTappedBy(Player const* player) const
|
||||||
{
|
{
|
||||||
if (player == GetOriginalLootRecipient())
|
if (player == GetOriginalLootRecipient())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
Group const* playerGroup = player->GetGroup();
|
Group const* playerGroup = player->GetGroup();
|
||||||
if (!playerGroup || playerGroup != GetGroupLootRecipient()) // if we dont have a group we arent the recipient
|
if (!playerGroup || playerGroup != GetGroupLootRecipient()) // if we dont have a group we arent the recipient
|
||||||
return false; // if creature doesnt have group bound it means it was solo killed by someone else
|
return false; // if creature doesnt have group bound it means it was solo killed by someone else
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
SpellEntry const* Creature::ReachWithSpellAttack(Unit* pVictim)
|
SpellEntry const* Creature::ReachWithSpellAttack(Unit* pVictim)
|
||||||
|
|
@ -1803,7 +1803,7 @@ void Creature::SendAIReaction(AiReaction reactionType)
|
||||||
void Creature::CallAssistance()
|
void Creature::CallAssistance()
|
||||||
{
|
{
|
||||||
// FIXME: should player pets call for assistance?
|
// FIXME: should player pets call for assistance?
|
||||||
if (!m_AlreadyCallAssistance && getVictim() && !IsCharmed())
|
if (!m_AlreadyCallAssistance && getVictim() && !IsCharmed())
|
||||||
{
|
{
|
||||||
SetNoCallAssistance(true);
|
SetNoCallAssistance(true);
|
||||||
AI()->SendAIEventAround(AI_EVENT_CALL_ASSISTANCE, getVictim(), sWorld.getConfig(CONFIG_UINT32_CREATURE_FAMILY_ASSISTANCE_DELAY), sWorld.getConfig(CONFIG_FLOAT_CREATURE_FAMILY_ASSISTANCE_RADIUS));
|
AI()->SendAIEventAround(AI_EVENT_CALL_ASSISTANCE, getVictim(), sWorld.getConfig(CONFIG_UINT32_CREATURE_FAMILY_ASSISTANCE_DELAY), sWorld.getConfig(CONFIG_FLOAT_CREATURE_FAMILY_ASSISTANCE_RADIUS));
|
||||||
|
|
@ -1812,7 +1812,7 @@ void Creature::CallAssistance()
|
||||||
|
|
||||||
void Creature::CallForHelp(float fRadius)
|
void Creature::CallForHelp(float fRadius)
|
||||||
{
|
{
|
||||||
if (fRadius <= 0.0f || !getVictim() || IsPet() || IsCharmed())
|
if (fRadius <= 0.0f || !getVictim() || IsPet() || IsCharmed())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MaNGOS::CallOfHelpCreatureInRangeDo u_do(this, getVictim(), fRadius);
|
MaNGOS::CallOfHelpCreatureInRangeDo u_do(this, getVictim(), fRadius);
|
||||||
|
|
@ -2180,9 +2180,9 @@ bool Creature::HasCategoryCooldown(uint32 spell_id) const
|
||||||
|
|
||||||
uint32 Creature::GetCreatureSpellCooldownDelay(uint32 spellId) const
|
uint32 Creature::GetCreatureSpellCooldownDelay(uint32 spellId) const
|
||||||
{
|
{
|
||||||
CreatureSpellCooldowns::const_iterator itr = m_CreatureSpellCooldowns.find(spellId);
|
CreatureSpellCooldowns::const_iterator itr = m_CreatureSpellCooldowns.find(spellId);
|
||||||
time_t t = time(NULL);
|
time_t t = time(NULL);
|
||||||
return uint32(itr != m_CreatureSpellCooldowns.end() && itr->second > t ? itr->second - t : 0);
|
return uint32(itr != m_CreatureSpellCooldowns.end() && itr->second > t ? itr->second - t : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Creature::HasSpellCooldown(uint32 spell_id) const
|
bool Creature::HasSpellCooldown(uint32 spell_id) const
|
||||||
|
|
@ -2446,7 +2446,7 @@ void Creature::ClearTemporaryFaction()
|
||||||
// No restore if creature is charmed/possessed.
|
// No restore if creature is charmed/possessed.
|
||||||
// For later we may consider extend to restore to charmer faction where charmer is creature.
|
// For later we may consider extend to restore to charmer faction where charmer is creature.
|
||||||
// This can also be done by update any pet/charmed of creature at any faction change to charmer.
|
// This can also be done by update any pet/charmed of creature at any faction change to charmer.
|
||||||
if (IsCharmed())
|
if (IsCharmed())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Reset to original faction
|
// Reset to original faction
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ namespace FactorySelector
|
||||||
CreatureAI* selectAI(Creature* creature)
|
CreatureAI* selectAI(Creature* creature)
|
||||||
{
|
{
|
||||||
// Allow scripting AI for normal creatures and not controlled pets (guardians and mini-pets)
|
// Allow scripting AI for normal creatures and not controlled pets (guardians and mini-pets)
|
||||||
if ((!creature->IsPet() || !((Pet*)creature)->isControlled()) && !creature->IsCharmed())
|
if ((!creature->IsPet() || !((Pet*)creature)->isControlled()) && !creature->IsCharmed())
|
||||||
if (CreatureAI* scriptedAI = sScriptMgr.GetCreatureAI(creature))
|
if (CreatureAI* scriptedAI = sScriptMgr.GetCreatureAI(creature))
|
||||||
return scriptedAI;
|
return scriptedAI;
|
||||||
|
|
||||||
|
|
@ -53,7 +53,7 @@ namespace FactorySelector
|
||||||
// excplicit check for isControlled() and owner type to allow guardian, mini-pets and pets controlled by NPCs to be scripted by EventAI
|
// excplicit check for isControlled() and owner type to allow guardian, mini-pets and pets controlled by NPCs to be scripted by EventAI
|
||||||
Unit* owner = NULL;
|
Unit* owner = NULL;
|
||||||
if ((creature->IsPet() && ((Pet*)creature)->isControlled() &&
|
if ((creature->IsPet() && ((Pet*)creature)->isControlled() &&
|
||||||
((owner = creature->GetOwner()) && owner->GetTypeId() == TYPEID_PLAYER)) || creature->IsCharmed())
|
((owner = creature->GetOwner()) && owner->GetTypeId() == TYPEID_PLAYER)) || creature->IsCharmed())
|
||||||
ai_factory = ai_registry.GetRegistryItem("PetAI");
|
ai_factory = ai_registry.GetRegistryItem("PetAI");
|
||||||
else if (creature->IsTotem())
|
else if (creature->IsTotem())
|
||||||
ai_factory = ai_registry.GetRegistryItem("TotemAI");
|
ai_factory = ai_registry.GetRegistryItem("TotemAI");
|
||||||
|
|
|
||||||
|
|
@ -708,8 +708,8 @@ class GameObject : public WorldObject
|
||||||
(m_respawnTime > 0 && !m_spawnedByDefault) ||
|
(m_respawnTime > 0 && !m_spawnedByDefault) ||
|
||||||
(m_respawnTime == 0 && m_spawnedByDefault);
|
(m_respawnTime == 0 && m_spawnedByDefault);
|
||||||
}
|
}
|
||||||
bool isSpawnedByDefault() const { return m_spawnedByDefault; }
|
bool isSpawnedByDefault() const { return m_spawnedByDefault; }
|
||||||
void SetSpawnedByDefault(bool b) { m_spawnedByDefault = b; }
|
void SetSpawnedByDefault(bool b) { m_spawnedByDefault = b; }
|
||||||
uint32 GetRespawnDelay() const { return m_respawnDelayTime; }
|
uint32 GetRespawnDelay() const { return m_respawnDelayTime; }
|
||||||
void Refresh();
|
void Refresh();
|
||||||
void Delete();
|
void Delete();
|
||||||
|
|
|
||||||
|
|
@ -244,7 +244,7 @@ bool Guild::AddMember(ObjectGuid plGuid, uint32 plRank)
|
||||||
pl->SetInGuild(m_Id);
|
pl->SetInGuild(m_Id);
|
||||||
pl->SetGuildLevel(GetLevel());
|
pl->SetGuildLevel(GetLevel());
|
||||||
pl->SetRank(newmember.RankId);
|
pl->SetRank(newmember.RankId);
|
||||||
pl->SetGuildIdInvited(0);
|
pl->SetGuildIdInvited(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateAccountsNumber();
|
UpdateAccountsNumber();
|
||||||
|
|
@ -569,13 +569,13 @@ bool Guild::DelMember(ObjectGuid guid, bool isDisbanding)
|
||||||
|
|
||||||
bool Guild::ChangeMemberRank(ObjectGuid guid, uint8 newRank)
|
bool Guild::ChangeMemberRank(ObjectGuid guid, uint8 newRank)
|
||||||
{
|
{
|
||||||
if (newRank <= GetLowestRank()) // Validate rank (allow only existing ranks)
|
if (newRank <= GetLowestRank()) // Validate rank (allow only existing ranks)
|
||||||
if (MemberSlot* member = GetMemberSlot(guid))
|
if (MemberSlot* member = GetMemberSlot(guid))
|
||||||
{
|
{
|
||||||
member->ChangeRank(newRank);
|
member->ChangeRank(newRank);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Guild::BroadcastToGuild(WorldSession* session, const std::string& msg, uint32 language)
|
void Guild::BroadcastToGuild(WorldSession* session, const std::string& msg, uint32 language)
|
||||||
|
|
|
||||||
|
|
@ -364,7 +364,7 @@ class Guild
|
||||||
void SetLeader(ObjectGuid guid);
|
void SetLeader(ObjectGuid guid);
|
||||||
bool AddMember(ObjectGuid plGuid, uint32 plRank);
|
bool AddMember(ObjectGuid plGuid, uint32 plRank);
|
||||||
bool DelMember(ObjectGuid guid, bool isDisbanding = false);
|
bool DelMember(ObjectGuid guid, bool isDisbanding = false);
|
||||||
bool ChangeMemberRank(ObjectGuid guid, uint8 newRank);
|
bool ChangeMemberRank(ObjectGuid guid, uint8 newRank);
|
||||||
// lowest rank is the count of ranks - 1 (the highest rank_id in table)
|
// lowest rank is the count of ranks - 1 (the highest rank_id in table)
|
||||||
uint32 GetLowestRank() const { return m_Ranks.size() - 1; }
|
uint32 GetLowestRank() const { return m_Ranks.size() - 1; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -411,9 +411,9 @@ bool Item::Create(uint32 guidlow, uint32 itemid, Player const* owner)
|
||||||
|
|
||||||
bool Item::IsNotEmptyBag() const
|
bool Item::IsNotEmptyBag() const
|
||||||
{
|
{
|
||||||
if (Bag const* bag = ToBag())
|
if (Bag const* bag = ToBag())
|
||||||
return !bag->IsEmpty();
|
return !bag->IsEmpty();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Item::UpdateDuration(Player* owner, uint32 diff)
|
void Item::UpdateDuration(Player* owner, uint32 diff)
|
||||||
|
|
|
||||||
|
|
@ -308,15 +308,15 @@ class Item : public Object
|
||||||
virtual bool LoadFromDB(uint32 guidLow, Field* fields, ObjectGuid ownerGuid = ObjectGuid());
|
virtual bool LoadFromDB(uint32 guidLow, Field* fields, ObjectGuid ownerGuid = ObjectGuid());
|
||||||
virtual void DeleteFromDB();
|
virtual void DeleteFromDB();
|
||||||
void DeleteFromInventoryDB();
|
void DeleteFromInventoryDB();
|
||||||
void LoadLootFromDB(Field* fields);
|
void LoadLootFromDB(Field* fields);
|
||||||
|
|
||||||
Bag* ToBag() { if (IsBag()) return reinterpret_cast<Bag*>(this); else return NULL; }
|
Bag* ToBag() { if (IsBag()) return reinterpret_cast<Bag*>(this); else return NULL; }
|
||||||
const Bag* ToBag() const { if (IsBag()) return reinterpret_cast<const Bag*>(this); else return NULL; }
|
const Bag* ToBag() const { if (IsBag()) return reinterpret_cast<const Bag*>(this); else return NULL; }
|
||||||
|
|
||||||
bool IsLocked() const { return !HasFlag(ITEM_FIELD_FLAGS, ITEM_DYNFLAG_UNLOCKED); }
|
bool IsLocked() const { return !HasFlag(ITEM_FIELD_FLAGS, ITEM_DYNFLAG_UNLOCKED); }
|
||||||
bool IsBag() const { return GetProto()->InventoryType == INVTYPE_BAG; }
|
bool IsBag() const { return GetProto()->InventoryType == INVTYPE_BAG; }
|
||||||
bool IsCurrencyToken() const { return GetProto()->IsCurrencyToken(); }
|
bool IsCurrencyToken() const { return GetProto()->IsCurrencyToken(); }
|
||||||
bool IsNotEmptyBag() const;
|
bool IsNotEmptyBag() const;
|
||||||
bool IsBroken() const { return GetUInt32Value(ITEM_FIELD_MAXDURABILITY) > 0 && GetUInt32Value(ITEM_FIELD_DURABILITY) == 0; }
|
bool IsBroken() const { return GetUInt32Value(ITEM_FIELD_MAXDURABILITY) > 0 && GetUInt32Value(ITEM_FIELD_DURABILITY) == 0; }
|
||||||
bool CanBeTraded(bool mail = false) const;
|
bool CanBeTraded(bool mail = false) const;
|
||||||
void SetInTrade(bool b = true) { mb_in_trade = b; }
|
void SetInTrade(bool b = true) { mb_in_trade = b; }
|
||||||
|
|
|
||||||
|
|
@ -652,9 +652,9 @@ struct ItemPrototype
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsCurrencyToken() const { return BagFamily & BAG_FAMILY_CURRENCY_TOKENS; }
|
bool IsCurrencyToken() const { return BagFamily & BAG_FAMILY_CURRENCY_TOKENS; }
|
||||||
|
|
||||||
uint32 GetMaxStackSize() const { return Stackable > 0 ? uint32(Stackable) : uint32(0x7FFFFFFF - 1); }
|
uint32 GetMaxStackSize() const { return Stackable > 0 ? uint32(Stackable) : uint32(0x7FFFFFFF - 1); }
|
||||||
float getDPS() const;
|
float getDPS() const;
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ bool PetAI::IsVisible(Unit* pl) const
|
||||||
bool PetAI::_needToStop() const
|
bool PetAI::_needToStop() const
|
||||||
{
|
{
|
||||||
// This is needed for charmed creatures, as once their target was reset other effects can trigger threat
|
// This is needed for charmed creatures, as once their target was reset other effects can trigger threat
|
||||||
if (m_creature->IsCharmed() && m_creature->getVictim() == m_creature->GetCharmer())
|
if (m_creature->IsCharmed() && m_creature->getVictim() == m_creature->GetCharmer())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return !m_creature->getVictim()->IsTargetableForAttack();
|
return !m_creature->getVictim()->IsTargetableForAttack();
|
||||||
|
|
|
||||||
|
|
@ -6757,7 +6757,7 @@ time_t Player::GetTalentResetTime() const
|
||||||
return m_resetTalentsTime;
|
return m_resetTalentsTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 Player::GetTalentResetCost() const
|
uint32 Player::GetTalentResetCost() const
|
||||||
{
|
{
|
||||||
return resetTalentsCost(); // this function added in dev21 - remove this comment if this line works
|
return resetTalentsCost(); // this function added in dev21 - remove this comment if this line works
|
||||||
}
|
}
|
||||||
|
|
@ -21749,7 +21749,7 @@ void Player::SendCorpseReclaimDelay(bool load)
|
||||||
GetSession()->SendPacket(&data);
|
GetSession()->SendPacket(&data);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 Player::GetNextResetTalentsCost() const
|
uint32 Player::GetNextResetTalentsCost() const
|
||||||
{
|
{
|
||||||
// The first time reset costs 1 gold
|
// The first time reset costs 1 gold
|
||||||
if (GetTalentResetCost() < 1 * GOLD)
|
if (GetTalentResetCost() < 1 * GOLD)
|
||||||
|
|
|
||||||
|
|
@ -1065,17 +1065,17 @@ class Player : public Unit
|
||||||
|
|
||||||
static bool BuildEnumData(QueryResult* result, ByteBuffer* data, ByteBuffer* buffer);
|
static bool BuildEnumData(QueryResult* result, ByteBuffer* data, ByteBuffer* buffer);
|
||||||
|
|
||||||
void SetInWater(bool apply);
|
void SetInWater(bool apply);
|
||||||
|
|
||||||
bool IsInWater() const override
|
bool IsInWater() const override
|
||||||
{
|
{
|
||||||
return m_isInWater;
|
return m_isInWater;
|
||||||
}
|
}
|
||||||
bool IsUnderWater() const override;
|
bool IsUnderWater() const override;
|
||||||
bool IsFalling()
|
bool IsFalling()
|
||||||
{
|
{
|
||||||
return GetPositionZ() < m_lastFallZ;
|
return GetPositionZ() < m_lastFallZ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendInitialPacketsBeforeAddToMap();
|
void SendInitialPacketsBeforeAddToMap();
|
||||||
void SendInitialPacketsAfterAddToMap();
|
void SendInitialPacketsAfterAddToMap();
|
||||||
|
|
@ -1109,7 +1109,7 @@ class Player : public Unit
|
||||||
void SetGameMaster(bool on);
|
void SetGameMaster(bool on);
|
||||||
bool isGMChat() const { return GetSession()->GetSecurity() >= SEC_MODERATOR && (m_ExtraFlags & PLAYER_EXTRA_GM_CHAT); }
|
bool isGMChat() const { return GetSession()->GetSecurity() >= SEC_MODERATOR && (m_ExtraFlags & PLAYER_EXTRA_GM_CHAT); }
|
||||||
void SetGMChat(bool on) { if (on) m_ExtraFlags |= PLAYER_EXTRA_GM_CHAT; else m_ExtraFlags &= ~PLAYER_EXTRA_GM_CHAT; }
|
void SetGMChat(bool on) { if (on) m_ExtraFlags |= PLAYER_EXTRA_GM_CHAT; else m_ExtraFlags &= ~PLAYER_EXTRA_GM_CHAT; }
|
||||||
bool IsTaxiCheater() const { return m_ExtraFlags & PLAYER_EXTRA_TAXICHEAT; }
|
bool IsTaxiCheater() const { return m_ExtraFlags & PLAYER_EXTRA_TAXICHEAT; }
|
||||||
void SetTaxiCheater(bool on) { if (on) m_ExtraFlags |= PLAYER_EXTRA_TAXICHEAT; else m_ExtraFlags &= ~PLAYER_EXTRA_TAXICHEAT; }
|
void SetTaxiCheater(bool on) { if (on) m_ExtraFlags |= PLAYER_EXTRA_TAXICHEAT; else m_ExtraFlags &= ~PLAYER_EXTRA_TAXICHEAT; }
|
||||||
bool isGMVisible() const { return !(m_ExtraFlags & PLAYER_EXTRA_GM_INVISIBLE); }
|
bool isGMVisible() const { return !(m_ExtraFlags & PLAYER_EXTRA_GM_INVISIBLE); }
|
||||||
void SetGMVisible(bool on);
|
void SetGMVisible(bool on);
|
||||||
|
|
@ -1756,15 +1756,15 @@ class Player : public Unit
|
||||||
void SetInGuild(uint32 GuildId);
|
void SetInGuild(uint32 GuildId);
|
||||||
void SetGuildLevel(uint32 level) { SetUInt32Value(PLAYER_GUILDLEVEL, level); }
|
void SetGuildLevel(uint32 level) { SetUInt32Value(PLAYER_GUILDLEVEL, level); }
|
||||||
void SetRank(uint32 rankId){ SetUInt32Value(PLAYER_GUILDRANK, rankId); }
|
void SetRank(uint32 rankId){ SetUInt32Value(PLAYER_GUILDRANK, rankId); }
|
||||||
// void SetGuildInvited(uint32 GuildId, ObjectGuid inviter = ObjectGuid()) { m_GuildIdInvited = GuildId; m_GuildInviterGuid = inviter; } .. PRE Dev21 version (DELETE IT?)
|
// void SetGuildInvited(uint32 GuildId, ObjectGuid inviter = ObjectGuid()) { m_GuildIdInvited = GuildId; m_GuildInviterGuid = inviter; } .. PRE Dev21 version (DELETE IT?)
|
||||||
void SetGuildIdInvited(uint32 GuildId)
|
void SetGuildIdInvited(uint32 GuildId)
|
||||||
{
|
{
|
||||||
m_GuildIdInvited = GuildId;
|
m_GuildIdInvited = GuildId;
|
||||||
}
|
}
|
||||||
uint32 GetGuildId() const { return GetGuildGuid().GetCounter(); }
|
uint32 GetGuildId() const { return GetGuildGuid().GetCounter(); }
|
||||||
ObjectGuid GetGuildGuid() const { return GetGuidValue(OBJECT_FIELD_DATA); }
|
ObjectGuid GetGuildGuid() const { return GetGuidValue(OBJECT_FIELD_DATA); }
|
||||||
std::string GetGuildName() const;
|
std::string GetGuildName() const;
|
||||||
uint32 GetTalentResetCost() const;
|
uint32 GetTalentResetCost() const;
|
||||||
time_t GetTalentResetTime() const;
|
time_t GetTalentResetTime() const;
|
||||||
static uint32 GetGuildIdFromDB(ObjectGuid guid);
|
static uint32 GetGuildIdFromDB(ObjectGuid guid);
|
||||||
static ObjectGuid GetGuildGuidFromDB(ObjectGuid guid);
|
static ObjectGuid GetGuildGuidFromDB(ObjectGuid guid);
|
||||||
|
|
@ -2349,7 +2349,7 @@ class Player : public Unit
|
||||||
void SetGroupUpdateFlag(uint32 flag) { m_groupUpdateMask |= flag; }
|
void SetGroupUpdateFlag(uint32 flag) { m_groupUpdateMask |= flag; }
|
||||||
const uint64& GetAuraUpdateMask() const { return m_auraUpdateMask; }
|
const uint64& GetAuraUpdateMask() const { return m_auraUpdateMask; }
|
||||||
void SetAuraUpdateMask(uint8 slot) { m_auraUpdateMask |= (uint64(1) << slot); }
|
void SetAuraUpdateMask(uint8 slot) { m_auraUpdateMask |= (uint64(1) << slot); }
|
||||||
uint32 GetNextResetTalentsCost() const;
|
uint32 GetNextResetTalentsCost() const;
|
||||||
Player* GetNextRandomRaidMember(float radius);
|
Player* GetNextRandomRaidMember(float radius);
|
||||||
PartyResult CanUninviteFromGroup() const;
|
PartyResult CanUninviteFromGroup() const;
|
||||||
// BattleGround Group System
|
// BattleGround Group System
|
||||||
|
|
|
||||||
|
|
@ -5704,17 +5704,17 @@ void Unit::SendAttackStateUpdate(uint32 HitInfo, Unit* target, uint8 /*SwingType
|
||||||
|
|
||||||
void Unit::SendAttackStateUpdate(uint32 HitInfo, Unit* target, SpellSchoolMask damageSchoolMask, uint32 Damage, uint32 AbsorbDamage, uint32 Resist, VictimState TargetState, uint32 BlockedAmount)
|
void Unit::SendAttackStateUpdate(uint32 HitInfo, Unit* target, SpellSchoolMask damageSchoolMask, uint32 Damage, uint32 AbsorbDamage, uint32 Resist, VictimState TargetState, uint32 BlockedAmount)
|
||||||
{
|
{
|
||||||
CalcDamageInfo dmgInfo;
|
CalcDamageInfo dmgInfo;
|
||||||
dmgInfo.HitInfo = HitInfo;
|
dmgInfo.HitInfo = HitInfo;
|
||||||
dmgInfo.attacker = this;
|
dmgInfo.attacker = this;
|
||||||
dmgInfo.target = target;
|
dmgInfo.target = target;
|
||||||
dmgInfo.damage = Damage - AbsorbDamage - Resist - BlockedAmount;
|
dmgInfo.damage = Damage - AbsorbDamage - Resist - BlockedAmount;
|
||||||
dmgInfo.damageSchoolMask = damageSchoolMask;
|
dmgInfo.damageSchoolMask = damageSchoolMask;
|
||||||
dmgInfo.absorb = AbsorbDamage;
|
dmgInfo.absorb = AbsorbDamage;
|
||||||
dmgInfo.resist = Resist;
|
dmgInfo.resist = Resist;
|
||||||
dmgInfo.TargetState = TargetState;
|
dmgInfo.TargetState = TargetState;
|
||||||
dmgInfo.blocked_amount = BlockedAmount;
|
dmgInfo.blocked_amount = BlockedAmount;
|
||||||
SendAttackStateUpdate(&dmgInfo);
|
SendAttackStateUpdate(&dmgInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Unit::SetPowerType(Powers new_powertype)
|
void Unit::SetPowerType(Powers new_powertype)
|
||||||
|
|
@ -8330,7 +8330,7 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy)
|
||||||
|
|
||||||
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
|
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
|
||||||
|
|
||||||
if (IsCharmed() || (GetTypeId() != TYPEID_PLAYER && ((Creature*)this)->IsPet()))
|
if (IsCharmed() || (GetTypeId() != TYPEID_PLAYER && ((Creature*)this)->IsPet()))
|
||||||
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PET_IN_COMBAT);
|
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PET_IN_COMBAT);
|
||||||
|
|
||||||
// interrupt all delayed non-combat casts
|
// interrupt all delayed non-combat casts
|
||||||
|
|
@ -8373,7 +8373,7 @@ void Unit::ClearInCombat()
|
||||||
m_CombatTimer = 0;
|
m_CombatTimer = 0;
|
||||||
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
|
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IN_COMBAT);
|
||||||
|
|
||||||
if (IsCharmed() || (GetTypeId() != TYPEID_PLAYER && ((Creature*)this)->IsPet()))
|
if (IsCharmed() || (GetTypeId() != TYPEID_PLAYER && ((Creature*)this)->IsPet()))
|
||||||
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PET_IN_COMBAT);
|
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PET_IN_COMBAT);
|
||||||
|
|
||||||
// Player's state will be cleared in Player::UpdateContestedPvP
|
// Player's state will be cleared in Player::UpdateContestedPvP
|
||||||
|
|
@ -9800,7 +9800,7 @@ bool Unit::isInvisibleForAlive() const
|
||||||
if (m_AuraFlags & UNIT_AURAFLAG_ALIVE_INVISIBLE)
|
if (m_AuraFlags & UNIT_AURAFLAG_ALIVE_INVISIBLE)
|
||||||
return true;
|
return true;
|
||||||
// TODO: maybe spiritservices also have just an aura
|
// TODO: maybe spiritservices also have just an aura
|
||||||
return IsSpiritService();
|
return IsSpiritService();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 Unit::GetCreatureType() const
|
uint32 Unit::GetCreatureType() const
|
||||||
|
|
|
||||||
|
|
@ -1684,8 +1684,8 @@ class Unit : public WorldObject
|
||||||
|
|
||||||
bool IsFullHealth() const { return GetHealth() == GetMaxHealth(); }
|
bool IsFullHealth() const { return GetHealth() == GetMaxHealth(); }
|
||||||
|
|
||||||
bool HealthBelowPct(int32 pct) const { return GetHealth() < CountPctFromMaxHealth(pct); }
|
bool HealthBelowPct(int32 pct) const { return GetHealth() < CountPctFromMaxHealth(pct); }
|
||||||
bool HealthAbovePct(int32 pct) const { return GetHealth() > CountPctFromMaxHealth(pct); }
|
bool HealthAbovePct(int32 pct) const { return GetHealth() > CountPctFromMaxHealth(pct); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the percent of the health. The formula: (GetHealth() * 100) / GetMaxHealth()
|
* Gets the percent of the health. The formula: (GetHealth() * 100) / GetMaxHealth()
|
||||||
|
|
@ -1693,9 +1693,9 @@ class Unit : public WorldObject
|
||||||
* \see GetHealth
|
* \see GetHealth
|
||||||
* \see GetMaxHealth
|
* \see GetMaxHealth
|
||||||
*/
|
*/
|
||||||
float GetHealthPercent() const { return (GetHealth() * 100.0f) / GetMaxHealth(); }
|
float GetHealthPercent() const { return (GetHealth() * 100.0f) / GetMaxHealth(); }
|
||||||
uint32 CountPctFromMaxHealth(int32 pct) const { return (GetMaxHealth() * static_cast<float>(pct) / 100.0f); }
|
uint32 CountPctFromMaxHealth(int32 pct) const { return (GetMaxHealth() * static_cast<float>(pct) / 100.0f); }
|
||||||
uint32 CountPctFromCurHealth(int32 pct) const { return (GetHealth() * static_cast<float>(pct) / 100.0f); }
|
uint32 CountPctFromCurHealth(int32 pct) const { return (GetHealth() * static_cast<float>(pct) / 100.0f); }
|
||||||
/**
|
/**
|
||||||
* Sets the health to the given value, it cant be higher than Unit::GetMaxHealth though
|
* Sets the health to the given value, it cant be higher than Unit::GetMaxHealth though
|
||||||
* @param val the value to set the health to
|
* @param val the value to set the health to
|
||||||
|
|
@ -2164,18 +2164,18 @@ class Unit : public WorldObject
|
||||||
bool IsVendor() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_VENDOR); }
|
bool IsVendor() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_VENDOR); }
|
||||||
bool IsTrainer() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_TRAINER); }
|
bool IsTrainer() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_TRAINER); }
|
||||||
bool IsQuestGiver() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); }
|
bool IsQuestGiver() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); }
|
||||||
bool IsGossip() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); }
|
bool IsGossip() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); }
|
||||||
bool IsTaxi() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_FLIGHTMASTER); }
|
bool IsTaxi() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_FLIGHTMASTER); }
|
||||||
bool IsGuildMaster() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_PETITIONER); }
|
bool IsGuildMaster() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_PETITIONER); }
|
||||||
bool IsBattleMaster() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_BATTLEMASTER); }
|
bool IsBattleMaster() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_BATTLEMASTER); }
|
||||||
bool IsBanker() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_BANKER); }
|
bool IsBanker() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_BANKER); }
|
||||||
bool IsInnkeeper() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_INNKEEPER); }
|
bool IsInnkeeper() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_INNKEEPER); }
|
||||||
bool IsSpiritHealer() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPIRITHEALER); }
|
bool IsSpiritHealer() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPIRITHEALER); }
|
||||||
bool IsSpiritGuide() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPIRITGUIDE); }
|
bool IsSpiritGuide() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPIRITGUIDE); }
|
||||||
bool IsTabardDesigner()const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_TABARDDESIGNER); }
|
bool IsTabardDesigner()const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_TABARDDESIGNER); }
|
||||||
bool isAuctioner() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_AUCTIONEER); }
|
bool isAuctioner() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_AUCTIONEER); }
|
||||||
bool IsArmorer() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_REPAIR); }
|
bool IsArmorer() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_REPAIR); }
|
||||||
bool IsServiceProvider() const
|
bool IsServiceProvider() const
|
||||||
{
|
{
|
||||||
return HasFlag(UNIT_NPC_FLAGS,
|
return HasFlag(UNIT_NPC_FLAGS,
|
||||||
UNIT_NPC_FLAG_VENDOR | UNIT_NPC_FLAG_TRAINER | UNIT_NPC_FLAG_FLIGHTMASTER |
|
UNIT_NPC_FLAG_VENDOR | UNIT_NPC_FLAG_TRAINER | UNIT_NPC_FLAG_FLIGHTMASTER |
|
||||||
|
|
@ -2183,7 +2183,7 @@ class Unit : public WorldObject
|
||||||
UNIT_NPC_FLAG_INNKEEPER | UNIT_NPC_FLAG_SPIRITHEALER |
|
UNIT_NPC_FLAG_INNKEEPER | UNIT_NPC_FLAG_SPIRITHEALER |
|
||||||
UNIT_NPC_FLAG_SPIRITGUIDE | UNIT_NPC_FLAG_TABARDDESIGNER | UNIT_NPC_FLAG_AUCTIONEER);
|
UNIT_NPC_FLAG_SPIRITGUIDE | UNIT_NPC_FLAG_TABARDDESIGNER | UNIT_NPC_FLAG_AUCTIONEER);
|
||||||
}
|
}
|
||||||
bool IsSpiritService() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPIRITHEALER | UNIT_NPC_FLAG_SPIRITGUIDE); }
|
bool IsSpiritService() const { return HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPIRITHEALER | UNIT_NPC_FLAG_SPIRITGUIDE); }
|
||||||
|
|
||||||
bool IsTaxiFlying() const { return hasUnitState(UNIT_STAT_TAXI_FLIGHT); }
|
bool IsTaxiFlying() const { return hasUnitState(UNIT_STAT_TAXI_FLIGHT); }
|
||||||
|
|
||||||
|
|
@ -2422,8 +2422,8 @@ class Unit : public WorldObject
|
||||||
* \todo What's the swingtype for?
|
* \todo What's the swingtype for?
|
||||||
*/
|
*/
|
||||||
void SendAttackStateUpdate(uint32 HitInfo, Unit* target, uint8 SwingType, SpellSchoolMask damageSchoolMask, uint32 Damage, uint32 AbsorbDamage, uint32 Resist, VictimState TargetState, uint32 BlockedAmount);
|
void SendAttackStateUpdate(uint32 HitInfo, Unit* target, uint8 SwingType, SpellSchoolMask damageSchoolMask, uint32 Damage, uint32 AbsorbDamage, uint32 Resist, VictimState TargetState, uint32 BlockedAmount);
|
||||||
void SendAttackStateUpdate(uint32 HitInfo, Unit* target, SpellSchoolMask damageSchoolMask, uint32 Damage, uint32 AbsorbDamage, uint32 Resist, VictimState TargetState, uint32 BlockedAmount);
|
void SendAttackStateUpdate(uint32 HitInfo, Unit* target, SpellSchoolMask damageSchoolMask, uint32 Damage, uint32 AbsorbDamage, uint32 Resist, VictimState TargetState, uint32 BlockedAmount);
|
||||||
/**
|
/**
|
||||||
* Used to send a update to the combat log for all \ref Player/\ref Unit s in the vicinity.
|
* Used to send a update to the combat log for all \ref Player/\ref Unit s in the vicinity.
|
||||||
* @param log Info about who/what did damage to who and how etc, data needed for the packet
|
* @param log Info about who/what did damage to who and how etc, data needed for the packet
|
||||||
* \see OpcodesList::SMSG_SPELLNONMELEEDAMAGELOG
|
* \see OpcodesList::SMSG_SPELLNONMELEEDAMAGELOG
|
||||||
|
|
@ -2564,32 +2564,32 @@ class Unit : public WorldObject
|
||||||
void SendThreatRemove(HostileReference* pHostileReference);
|
void SendThreatRemove(HostileReference* pHostileReference);
|
||||||
void SendThreatUpdate();
|
void SendThreatUpdate();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks whether or not this \ref Unit is alive by checking the \ref Unit::m_deathState member
|
* Checks whether or not this \ref Unit is alive by checking the \ref Unit::m_deathState member
|
||||||
* for the value \ref DeathState::ALIVE
|
* for the value \ref DeathState::ALIVE
|
||||||
* @return true if this \ref Unit is alive, false otherwise
|
* @return true if this \ref Unit is alive, false otherwise
|
||||||
*/
|
*/
|
||||||
bool IsAlive() const { return (m_deathState == ALIVE); };
|
bool IsAlive() const { return (m_deathState == ALIVE); };
|
||||||
bool IsDying() const { return (m_deathState == JUST_DIED); }
|
bool IsDying() const { return (m_deathState == JUST_DIED); }
|
||||||
/**
|
/**
|
||||||
* Checks whether or not this \ref Unit is dead by checking the \ref Unit::m_deathState member
|
* Checks whether or not this \ref Unit is dead by checking the \ref Unit::m_deathState member
|
||||||
* for the value \ref DeathState::DEAD or \ref DeathState::CORPSE
|
* for the value \ref DeathState::DEAD or \ref DeathState::CORPSE
|
||||||
* @return true if this \ref Unit is dead or a corpse (also dead), false otherwise
|
* @return true if this \ref Unit is dead or a corpse (also dead), false otherwise
|
||||||
*/
|
*/
|
||||||
bool IsDead() const { return (m_deathState == DEAD || m_deathState == CORPSE); };
|
bool IsDead() const { return (m_deathState == DEAD || m_deathState == CORPSE); };
|
||||||
/**
|
/**
|
||||||
* Returns the current \ref DeathState for this \ref Unit.
|
* Returns the current \ref DeathState for this \ref Unit.
|
||||||
* @return the value of the member \ref Unit::m_deathState
|
* @return the value of the member \ref Unit::m_deathState
|
||||||
*/
|
*/
|
||||||
DeathState getDeathState() const { return m_deathState; };
|
DeathState getDeathState() const { return m_deathState; };
|
||||||
/**
|
/**
|
||||||
* Changes the \ref DeathState for this \ref Unit and making sure that some things that should
|
* Changes the \ref DeathState for this \ref Unit and making sure that some things that should
|
||||||
* happen when that changes happen, ie: you just died, then you're auras should be removed,
|
* happen when that changes happen, ie: you just died, then you're auras should be removed,
|
||||||
* any combopoints that you had should be removed etc.
|
* any combopoints that you had should be removed etc.
|
||||||
*
|
*
|
||||||
* This is overwritten to do different things in at least \ref Player, \ref Creature, \ref Pet
|
* This is overwritten to do different things in at least \ref Player, \ref Creature, \ref Pet
|
||||||
* @param s the new \ref DeathState this \ref Unit should get
|
* @param s the new \ref DeathState this \ref Unit should get
|
||||||
*/
|
*/
|
||||||
virtual void SetDeathState(DeathState s); // overwritten in Creature/Player/Pet
|
virtual void SetDeathState(DeathState s); // overwritten in Creature/Player/Pet
|
||||||
|
|
||||||
ObjectGuid const& GetOwnerGuid() const { return GetGuidValue(UNIT_FIELD_SUMMONEDBY); }
|
ObjectGuid const& GetOwnerGuid() const { return GetGuidValue(UNIT_FIELD_SUMMONEDBY); }
|
||||||
|
|
@ -2737,7 +2737,7 @@ class Unit : public WorldObject
|
||||||
* @return true if the \ref Unit has a charmer, false otherwise
|
* @return true if the \ref Unit has a charmer, false otherwise
|
||||||
* \see Unit::GetCharmerGuid
|
* \see Unit::GetCharmerGuid
|
||||||
*/
|
*/
|
||||||
bool IsCharmed() const { return !GetCharmerGuid().IsEmpty(); }
|
bool IsCharmed() const { return !GetCharmerGuid().IsEmpty(); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* There's only \ref CharmInfo available if this \ref Unit is in fact charmed by someone
|
* There's only \ref CharmInfo available if this \ref Unit is in fact charmed by someone
|
||||||
|
|
@ -3035,8 +3035,8 @@ class Unit : public WorldObject
|
||||||
// delayed+channeled spells are always interrupted
|
// delayed+channeled spells are always interrupted
|
||||||
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid = 0);
|
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid = 0);
|
||||||
|
|
||||||
Spell* GetCurrentSpell(CurrentSpellTypes spellType) const { return m_currentSpells[spellType]; }
|
Spell* GetCurrentSpell(CurrentSpellTypes spellType) const { return m_currentSpells[spellType]; }
|
||||||
Spell* GetCurrentSpell(uint32 spellType) const { return m_currentSpells[spellType]; }
|
Spell* GetCurrentSpell(uint32 spellType) const { return m_currentSpells[spellType]; }
|
||||||
Spell* FindCurrentSpellBySpellId(uint32 spell_id) const;
|
Spell* FindCurrentSpellBySpellId(uint32 spell_id) const;
|
||||||
|
|
||||||
bool CheckAndIncreaseCastCounter();
|
bool CheckAndIncreaseCastCounter();
|
||||||
|
|
|
||||||
|
|
@ -3067,8 +3067,8 @@ enum SkillType
|
||||||
SKILL_BALANCE = 574,
|
SKILL_BALANCE = 574,
|
||||||
SKILL_DESTRUCTION = 593,
|
SKILL_DESTRUCTION = 593,
|
||||||
SKILL_HOLY2 = 594,
|
SKILL_HOLY2 = 594,
|
||||||
SKILL_DISCIPLINE = 613,
|
SKILL_DISCIPLINE = 613,
|
||||||
SKILL_LOCKPICKING = 633,
|
SKILL_LOCKPICKING = 633,
|
||||||
SKILL_PET_BAT = 653,
|
SKILL_PET_BAT = 653,
|
||||||
SKILL_PET_HYENA = 654,
|
SKILL_PET_HYENA = 654,
|
||||||
SKILL_PET_BIRD_OF_PREY = 655,
|
SKILL_PET_BIRD_OF_PREY = 655,
|
||||||
|
|
|
||||||
|
|
@ -253,8 +253,8 @@ class WorldSession
|
||||||
void SendLfgRewards(LFGRewards const& rewards);
|
void SendLfgRewards(LFGRewards const& rewards);
|
||||||
void SendLfgBootUpdate(LFGBoot const& boot);
|
void SendLfgBootUpdate(LFGBoot const& boot);
|
||||||
|
|
||||||
void SendPartyResult(PartyOperation operation, const std::string& member, PartyResult res);
|
void SendPartyResult(PartyOperation operation, const std::string& member, PartyResult res);
|
||||||
void SendGuildInvite(Player* player, bool alreadyInGuild = false);
|
void SendGuildInvite(Player* player, bool alreadyInGuild = false);
|
||||||
void SendGroupInvite(Player* player, bool alreadyInGroup = false);
|
void SendGroupInvite(Player* player, bool alreadyInGroup = false);
|
||||||
void SendAreaTriggerMessage(const char* Text, ...) ATTR_PRINTF(2, 3);
|
void SendAreaTriggerMessage(const char* Text, ...) ATTR_PRINTF(2, 3);
|
||||||
void SendTransferAborted(uint32 mapid, uint8 reason, uint8 arg = 0);
|
void SendTransferAborted(uint32 mapid, uint8 reason, uint8 arg = 0);
|
||||||
|
|
|
||||||
|
|
@ -3717,75 +3717,75 @@ void ChatHandler::LogCommand(char const* fullcmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatHandler::BuildChatPacket(WorldPacket& data, ChatMsg msgtype, char const* message, Language language /*= LANG_UNIVERSAL*/, ChatTagFlags chatTag /*= CHAT_TAG_NONE*/,
|
void ChatHandler::BuildChatPacket(WorldPacket& data, ChatMsg msgtype, char const* message, Language language /*= LANG_UNIVERSAL*/, ChatTagFlags chatTag /*= CHAT_TAG_NONE*/,
|
||||||
ObjectGuid const& senderGuid /*= ObjectGuid()*/, char const* senderName /*= NULL*/,
|
ObjectGuid const& senderGuid /*= ObjectGuid()*/, char const* senderName /*= NULL*/,
|
||||||
ObjectGuid const& targetGuid /*= ObjectGuid()*/, char const* targetName /*= NULL*/,
|
ObjectGuid const& targetGuid /*= ObjectGuid()*/, char const* targetName /*= NULL*/,
|
||||||
char const* channelName /*= NULL*/)
|
char const* channelName /*= NULL*/)
|
||||||
{
|
{
|
||||||
bool isGM = chatTag & CHAT_TAG_GM;
|
bool isGM = chatTag & CHAT_TAG_GM;
|
||||||
|
|
||||||
data.Initialize(isGM ? SMSG_GM_MESSAGECHAT : SMSG_MESSAGECHAT);
|
data.Initialize(isGM ? SMSG_GM_MESSAGECHAT : SMSG_MESSAGECHAT);
|
||||||
data << uint8(msgtype);
|
data << uint8(msgtype);
|
||||||
data << uint32(language);
|
data << uint32(language);
|
||||||
data << ObjectGuid(senderGuid);
|
data << ObjectGuid(senderGuid);
|
||||||
data << uint32(0); // 2.1.0
|
data << uint32(0); // 2.1.0
|
||||||
|
|
||||||
switch (msgtype)
|
switch (msgtype)
|
||||||
{
|
{
|
||||||
case CHAT_MSG_MONSTER_SAY:
|
case CHAT_MSG_MONSTER_SAY:
|
||||||
case CHAT_MSG_MONSTER_PARTY:
|
case CHAT_MSG_MONSTER_PARTY:
|
||||||
case CHAT_MSG_MONSTER_YELL:
|
case CHAT_MSG_MONSTER_YELL:
|
||||||
case CHAT_MSG_MONSTER_WHISPER:
|
case CHAT_MSG_MONSTER_WHISPER:
|
||||||
case CHAT_MSG_RAID_BOSS_WHISPER:
|
case CHAT_MSG_RAID_BOSS_WHISPER:
|
||||||
case CHAT_MSG_RAID_BOSS_EMOTE:
|
case CHAT_MSG_RAID_BOSS_EMOTE:
|
||||||
case CHAT_MSG_MONSTER_EMOTE:
|
case CHAT_MSG_MONSTER_EMOTE:
|
||||||
MANGOS_ASSERT(senderName);
|
MANGOS_ASSERT(senderName);
|
||||||
data << uint32(strlen(senderName) + 1);
|
data << uint32(strlen(senderName) + 1);
|
||||||
data << senderName;
|
data << senderName;
|
||||||
data << ObjectGuid(targetGuid); // Unit Target
|
data << ObjectGuid(targetGuid); // Unit Target
|
||||||
if (targetGuid && !targetGuid.IsPlayer() && !targetGuid.IsPet())
|
if (targetGuid && !targetGuid.IsPlayer() && !targetGuid.IsPet())
|
||||||
{
|
{
|
||||||
data << uint32(strlen(targetName) + 1); // target name length
|
data << uint32(strlen(targetName) + 1); // target name length
|
||||||
data << targetName; // target name
|
data << targetName; // target name
|
||||||
}
|
}
|
||||||
MANGOS_ASSERT(message);
|
MANGOS_ASSERT(message);
|
||||||
data << uint32(strlen(message) + 1);
|
data << uint32(strlen(message) + 1);
|
||||||
data << message;
|
data << message;
|
||||||
data << uint8(chatTag);
|
data << uint8(chatTag);
|
||||||
break;
|
break;
|
||||||
case CHAT_MSG_BG_SYSTEM_NEUTRAL:
|
case CHAT_MSG_BG_SYSTEM_NEUTRAL:
|
||||||
case CHAT_MSG_BG_SYSTEM_ALLIANCE:
|
case CHAT_MSG_BG_SYSTEM_ALLIANCE:
|
||||||
case CHAT_MSG_BG_SYSTEM_HORDE:
|
case CHAT_MSG_BG_SYSTEM_HORDE:
|
||||||
data << ObjectGuid(targetGuid); // Unit Target
|
data << ObjectGuid(targetGuid); // Unit Target
|
||||||
if (targetGuid && !targetGuid.IsPlayer())
|
if (targetGuid && !targetGuid.IsPlayer())
|
||||||
{
|
{
|
||||||
MANGOS_ASSERT(targetName);
|
MANGOS_ASSERT(targetName);
|
||||||
data << uint32(strlen(targetName) + 1); // target name length
|
data << uint32(strlen(targetName) + 1); // target name length
|
||||||
data << targetName; // target name
|
data << targetName; // target name
|
||||||
}
|
}
|
||||||
MANGOS_ASSERT(message);
|
MANGOS_ASSERT(message);
|
||||||
data << uint32(strlen(message) + 1);
|
data << uint32(strlen(message) + 1);
|
||||||
data << message;
|
data << message;
|
||||||
data << uint8(chatTag);
|
data << uint8(chatTag);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (msgtype == CHAT_MSG_CHANNEL)
|
if (msgtype == CHAT_MSG_CHANNEL)
|
||||||
{
|
{
|
||||||
MANGOS_ASSERT(channelName);
|
MANGOS_ASSERT(channelName);
|
||||||
data << channelName;
|
data << channelName;
|
||||||
}
|
}
|
||||||
data << ObjectGuid(targetGuid);
|
data << ObjectGuid(targetGuid);
|
||||||
MANGOS_ASSERT(message);
|
MANGOS_ASSERT(message);
|
||||||
data << uint32(strlen(message) + 1);
|
data << uint32(strlen(message) + 1);
|
||||||
data << message;
|
data << message;
|
||||||
data << uint8(chatTag);
|
data << uint8(chatTag);
|
||||||
if (isGM)
|
if (isGM)
|
||||||
{
|
{
|
||||||
MANGOS_ASSERT(senderName);
|
MANGOS_ASSERT(senderName);
|
||||||
data << uint32(strlen(senderName) + 1);
|
data << uint32(strlen(senderName) + 1);
|
||||||
data << senderName;
|
data << senderName;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Instantiate template for helper function
|
// Instantiate template for helper function
|
||||||
|
|
|
||||||
|
|
@ -71,12 +71,12 @@ enum ChatCommandSearchResult
|
||||||
|
|
||||||
enum PlayerChatTag
|
enum PlayerChatTag
|
||||||
{
|
{
|
||||||
CHAT_TAG_NONE = 0,
|
CHAT_TAG_NONE = 0,
|
||||||
CHAT_TAG_AFK = 1,
|
CHAT_TAG_AFK = 1,
|
||||||
CHAT_TAG_DND = 2,
|
CHAT_TAG_DND = 2,
|
||||||
CHAT_TAG_GM = 3,
|
CHAT_TAG_GM = 3,
|
||||||
CHAT_TAG_COM = 4, // Commentator
|
CHAT_TAG_COM = 4, // Commentator
|
||||||
CHAT_TAG_DEV = 5, // Developer
|
CHAT_TAG_DEV = 5, // Developer
|
||||||
};
|
};
|
||||||
typedef uint32 ChatTagFlags;
|
typedef uint32 ChatTagFlags;
|
||||||
|
|
||||||
|
|
@ -120,32 +120,32 @@ class ChatHandler
|
||||||
ChatCommand const* FindCommand(char const* text);
|
ChatCommand const* FindCommand(char const* text);
|
||||||
|
|
||||||
bool isValidChatMessage(const char* msg);
|
bool isValidChatMessage(const char* msg);
|
||||||
bool HasSentErrorMessage() { return sentErrorMessage; }
|
bool HasSentErrorMessage() { return sentErrorMessage; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Prepare SMSG_GM_MESSAGECHAT/SMSG_MESSAGECHAT
|
* \brief Prepare SMSG_GM_MESSAGECHAT/SMSG_MESSAGECHAT
|
||||||
*
|
*
|
||||||
* Method: BuildChatPacket build message chat packet generic way
|
* Method: BuildChatPacket build message chat packet generic way
|
||||||
* FullName: ChatHandler::BuildChatPacket
|
* FullName: ChatHandler::BuildChatPacket
|
||||||
* Access: public static
|
* Access: public static
|
||||||
* Returns: void
|
* Returns: void
|
||||||
*
|
*
|
||||||
* \param WorldPacket& data : Provided packet will be filled with requested info
|
* \param WorldPacket& data : Provided packet will be filled with requested info
|
||||||
* \param ChatMsg msgtype : Message type from ChatMsg enum from SharedDefines.h
|
* \param ChatMsg msgtype : Message type from ChatMsg enum from SharedDefines.h
|
||||||
* \param ChatTagFlags chatTag : Chat tag from PlayerChatTag in Chat.h
|
* \param ChatTagFlags chatTag : Chat tag from PlayerChatTag in Chat.h
|
||||||
* \param char const* message : Message to send
|
* \param char const* message : Message to send
|
||||||
* \param Language language : Language from Language enum in SharedDefines.h
|
* \param Language language : Language from Language enum in SharedDefines.h
|
||||||
* \param ObjectGuid const& senderGuid : May be null in some case but often required for ignore list
|
* \param ObjectGuid const& senderGuid : May be null in some case but often required for ignore list
|
||||||
* \param char const* senderName : Required for type *MONSTER* or *BATTLENET, but also if GM is true
|
* \param char const* senderName : Required for type *MONSTER* or *BATTLENET, but also if GM is true
|
||||||
* \param ObjectGuid const& targetGuid : Often null, but needed for type *MONSTER* or *BATTLENET or *BATTLEGROUND* or *ACHIEVEMENT
|
* \param ObjectGuid const& targetGuid : Often null, but needed for type *MONSTER* or *BATTLENET or *BATTLEGROUND* or *ACHIEVEMENT
|
||||||
* \param char const* targetName : Often null, but needed for type *MONSTER* or *BATTLENET or *BATTLEGROUND*
|
* \param char const* targetName : Often null, but needed for type *MONSTER* or *BATTLENET or *BATTLEGROUND*
|
||||||
* \param char const* channelName : Required only for CHAT_MSG_CHANNEL
|
* \param char const* channelName : Required only for CHAT_MSG_CHANNEL
|
||||||
**/
|
**/
|
||||||
static void BuildChatPacket(
|
static void BuildChatPacket(
|
||||||
WorldPacket& data, ChatMsg msgtype, char const* message, Language language = LANG_UNIVERSAL, ChatTagFlags chatTag = CHAT_TAG_NONE,
|
WorldPacket& data, ChatMsg msgtype, char const* message, Language language = LANG_UNIVERSAL, ChatTagFlags chatTag = CHAT_TAG_NONE,
|
||||||
ObjectGuid const& senderGuid = ObjectGuid(), char const* senderName = NULL,
|
ObjectGuid const& senderGuid = ObjectGuid(), char const* senderName = NULL,
|
||||||
ObjectGuid const& targetGuid = ObjectGuid(), char const* targetName = NULL,
|
ObjectGuid const& targetGuid = ObjectGuid(), char const* targetName = NULL,
|
||||||
char const* channelName = NULL);
|
char const* channelName = NULL);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit ChatHandler() : m_session(NULL) {} // for CLI subclass
|
explicit ChatHandler() : m_session(NULL) {} // for CLI subclass
|
||||||
|
|
|
||||||
|
|
@ -866,7 +866,7 @@ namespace MaNGOS
|
||||||
bool operator()(Unit* u)
|
bool operator()(Unit* u)
|
||||||
{
|
{
|
||||||
if (u->IsAlive() && u->IsInCombat() && !i_obj->IsHostileTo(u) && i_obj->IsWithinDistInMap(u, i_range) &&
|
if (u->IsAlive() && u->IsInCombat() && !i_obj->IsHostileTo(u) && i_obj->IsWithinDistInMap(u, i_range) &&
|
||||||
(u->IsCharmed() || u->IsFrozen() || u->hasUnitState(UNIT_STAT_CAN_NOT_REACT)))
|
(u->IsCharmed() || u->IsFrozen() || u->hasUnitState(UNIT_STAT_CAN_NOT_REACT)))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -76,13 +76,13 @@ void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket)
|
||||||
|
|
||||||
void WorldSession::SendGuildInvite(Player* player, bool alreadyInGuild /*= false*/)
|
void WorldSession::SendGuildInvite(Player* player, bool alreadyInGuild /*= false*/)
|
||||||
{
|
{
|
||||||
Guild* guild = sGuildMgr.GetGuildById(GetPlayer()->GetGuildId());
|
Guild* guild = sGuildMgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||||
player->SetGuildIdInvited(GetPlayer()->GetGuildId());
|
player->SetGuildIdInvited(GetPlayer()->GetGuildId());
|
||||||
|
|
||||||
WorldPacket data(SMSG_GUILD_INVITE, (8 + 10)); // guess size
|
WorldPacket data(SMSG_GUILD_INVITE, (8 + 10)); // guess size
|
||||||
data << GetPlayer()->GetName();
|
data << GetPlayer()->GetName();
|
||||||
data << guild->GetName();
|
data << guild->GetName();
|
||||||
player->GetSession()->SendPacket(&data); // unk
|
player->GetSession()->SendPacket(&data); // unk
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
|
void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
|
||||||
|
|
@ -143,7 +143,7 @@ void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
|
||||||
|
|
||||||
DEBUG_LOG("Player %s Invited %s to Join his Guild", GetPlayer()->GetName(), Invitedname.c_str());
|
DEBUG_LOG("Player %s Invited %s to Join his Guild", GetPlayer()->GetName(), Invitedname.c_str());
|
||||||
|
|
||||||
player->SetGuildIdInvited(GetPlayer()->GetGuildId());
|
player->SetGuildIdInvited(GetPlayer()->GetGuildId());
|
||||||
// Put record into guildlog
|
// Put record into guildlog
|
||||||
guild->LogGuildEvent(GUILD_EVENT_LOG_INVITE_PLAYER, GetPlayer()->GetObjectGuid(), player->GetObjectGuid());
|
guild->LogGuildEvent(GUILD_EVENT_LOG_INVITE_PLAYER, GetPlayer()->GetObjectGuid(), player->GetObjectGuid());
|
||||||
|
|
||||||
|
|
@ -292,7 +292,7 @@ void WorldSession::HandleGuildDeclineOpcode(WorldPacket& recvPacket)
|
||||||
if (Player* inviter = sObjectMgr.GetPlayer(GetPlayer()->GetGuildInviterGuid()))
|
if (Player* inviter = sObjectMgr.GetPlayer(GetPlayer()->GetGuildInviterGuid()))
|
||||||
inviter->SendGuildDeclined(GetPlayer()->GetName(), recvPacket.GetOpcode() == CMSG_GUILD_AUTO_DECLINE);
|
inviter->SendGuildDeclined(GetPlayer()->GetName(), recvPacket.GetOpcode() == CMSG_GUILD_AUTO_DECLINE);
|
||||||
|
|
||||||
GetPlayer()->SetGuildIdInvited(0);
|
GetPlayer()->SetGuildIdInvited(0);
|
||||||
GetPlayer()->SetInGuild(0);
|
GetPlayer()->SetInGuild(0);
|
||||||
GetPlayer()->SetGuildLevel(0);
|
GetPlayer()->SetGuildLevel(0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -354,7 +354,7 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket& recv_data)
|
||||||
|
|
||||||
pCreature->StopMoving();
|
pCreature->StopMoving();
|
||||||
|
|
||||||
if (pCreature->IsSpiritGuide())
|
if (pCreature->IsSpiritGuide())
|
||||||
pCreature->SendAreaSpiritHealerQueryOpcode(_player);
|
pCreature->SendAreaSpiritHealerQueryOpcode(_player);
|
||||||
|
|
||||||
if (!sScriptMgr.OnGossipHello(_player, pCreature))
|
if (!sScriptMgr.OnGossipHello(_player, pCreature))
|
||||||
|
|
|
||||||
|
|
@ -462,7 +462,7 @@ void WorldSession::HandlePetSetAction(WorldPacket& recv_data)
|
||||||
// sign for autocast
|
// sign for autocast
|
||||||
if (act_state == ACT_ENABLED && spell_id)
|
if (act_state == ACT_ENABLED && spell_id)
|
||||||
{
|
{
|
||||||
if (pet->IsCharmed())
|
if (pet->IsCharmed())
|
||||||
charmInfo->ToggleCreatureAutocast(spell_id, true);
|
charmInfo->ToggleCreatureAutocast(spell_id, true);
|
||||||
else
|
else
|
||||||
((Pet*)pet)->ToggleAutocast(spell_id, true);
|
((Pet*)pet)->ToggleAutocast(spell_id, true);
|
||||||
|
|
@ -470,7 +470,7 @@ void WorldSession::HandlePetSetAction(WorldPacket& recv_data)
|
||||||
// sign for no/turn off autocast
|
// sign for no/turn off autocast
|
||||||
else if (act_state == ACT_DISABLED && spell_id)
|
else if (act_state == ACT_DISABLED && spell_id)
|
||||||
{
|
{
|
||||||
if (pet->IsCharmed())
|
if (pet->IsCharmed())
|
||||||
charmInfo->ToggleCreatureAutocast(spell_id, false);
|
charmInfo->ToggleCreatureAutocast(spell_id, false);
|
||||||
else
|
else
|
||||||
((Pet*)pet)->ToggleAutocast(spell_id, false);
|
((Pet*)pet)->ToggleAutocast(spell_id, false);
|
||||||
|
|
@ -632,7 +632,7 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pet->IsCharmed())
|
if (pet->IsCharmed())
|
||||||
// state can be used as boolean
|
// state can be used as boolean
|
||||||
pet->GetCharmInfo()->ToggleCreatureAutocast(spellid, state);
|
pet->GetCharmInfo()->ToggleCreatureAutocast(spellid, state);
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -92,11 +92,11 @@ void WorldSession::HandlePetitionBuyOpcode(WorldPacket& recv_data)
|
||||||
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
if (GetPlayer()->hasUnitState(UNIT_STAT_DIED))
|
||||||
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);
|
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);
|
||||||
|
|
||||||
if (!pCreature->IsTabardDesigner())
|
if (!pCreature->IsTabardDesigner())
|
||||||
{
|
{
|
||||||
sLog.outError("WORLD: HandlePetitionBuyOpcode - unsupported npc type, npc: %s", guidNPC.GetString().c_str());
|
sLog.outError("WORLD: HandlePetitionBuyOpcode - unsupported npc type, npc: %s", guidNPC.GetString().c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sGuildMgr.GetGuildByName(name))
|
if (sGuildMgr.GetGuildByName(name))
|
||||||
{
|
{
|
||||||
|
|
@ -678,7 +678,7 @@ void WorldSession::SendPetitionShowList(ObjectGuid guid)
|
||||||
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);
|
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);
|
||||||
|
|
||||||
// only guild petitions currently used
|
// only guild petitions currently used
|
||||||
if (!pCreature->IsTabardDesigner())
|
if (!pCreature->IsTabardDesigner())
|
||||||
{
|
{
|
||||||
DEBUG_LOG("WORLD: HandlePetitionShowListOpcode - %s is not supported npc type.", guid.GetString().c_str());
|
DEBUG_LOG("WORLD: HandlePetitionShowListOpcode - %s is not supported npc type.", guid.GetString().c_str());
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -5756,7 +5756,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
||||||
|
|
||||||
Creature* target = (Creature*)m_targets.getUnitTarget();
|
Creature* target = (Creature*)m_targets.getUnitTarget();
|
||||||
|
|
||||||
if (target->IsPet() || target->IsCharmed())
|
if (target->IsPet() || target->IsCharmed())
|
||||||
{
|
{
|
||||||
plrCaster->SendPetTameFailure(PETTAME_CREATUREALREADYOWNED);
|
plrCaster->SendPetTameFailure(PETTAME_CREATUREALREADYOWNED);
|
||||||
return SPELL_FAILED_DONT_REPORT;
|
return SPELL_FAILED_DONT_REPORT;
|
||||||
|
|
@ -6325,7 +6325,7 @@ SpellCastResult Spell::CheckPetCast(Unit* target)
|
||||||
if (m_caster->IsInCombat() && IsNonCombatSpell(m_spellInfo))
|
if (m_caster->IsInCombat() && IsNonCombatSpell(m_spellInfo))
|
||||||
return SPELL_FAILED_AFFECTING_COMBAT;
|
return SPELL_FAILED_AFFECTING_COMBAT;
|
||||||
|
|
||||||
if (m_caster->GetTypeId() == TYPEID_UNIT && (((Creature*)m_caster)->IsPet() || m_caster->IsCharmed()))
|
if (m_caster->GetTypeId() == TYPEID_UNIT && (((Creature*)m_caster)->IsPet() || m_caster->IsCharmed()))
|
||||||
{
|
{
|
||||||
// dead owner (pets still alive when owners ressed?)
|
// dead owner (pets still alive when owners ressed?)
|
||||||
if (m_caster->GetCharmerOrOwner() && !m_caster->GetCharmerOrOwner()->IsAlive())
|
if (m_caster->GetCharmerOrOwner() && !m_caster->GetCharmerOrOwner()->IsAlive())
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ void WorldSession::SendTaxiMenu(Creature* unit)
|
||||||
data << uint32(1);
|
data << uint32(1);
|
||||||
data << unit->GetObjectGuid();
|
data << unit->GetObjectGuid();
|
||||||
data << uint32(curloc);
|
data << uint32(curloc);
|
||||||
GetPlayer()->m_taxi.AppendTaximaskTo(data, GetPlayer()->IsTaxiCheater());
|
GetPlayer()->m_taxi.AppendTaximaskTo(data, GetPlayer()->IsTaxiCheater());
|
||||||
SendPacket(&data);
|
SendPacket(&data);
|
||||||
|
|
||||||
DEBUG_LOG("WORLD: Sent SMSG_SHOWTAXINODES");
|
DEBUG_LOG("WORLD: Sent SMSG_SHOWTAXINODES");
|
||||||
|
|
@ -240,7 +240,7 @@ void WorldSession::HandleMoveSplineDoneOpcode(WorldPacket& recv_data)
|
||||||
uint32 sourcenode = GetPlayer()->m_taxi.GetTaxiSource();
|
uint32 sourcenode = GetPlayer()->m_taxi.GetTaxiSource();
|
||||||
|
|
||||||
// Add to taximask middle hubs in taxicheat mode (to prevent having player with disabled taxicheat and not having back flight path)
|
// Add to taximask middle hubs in taxicheat mode (to prevent having player with disabled taxicheat and not having back flight path)
|
||||||
if (GetPlayer()->IsTaxiCheater())
|
if (GetPlayer()->IsTaxiCheater())
|
||||||
{
|
{
|
||||||
if (GetPlayer()->m_taxi.SetTaximaskNode(sourcenode))
|
if (GetPlayer()->m_taxi.SetTaximaskNode(sourcenode))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue