mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 01:37:00 +00:00
Build error fixes
43 errors left at this point
This commit is contained in:
parent
3abc31c429
commit
924d182855
18 changed files with 123 additions and 71 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
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -883,7 +883,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());
|
||||||
|
|
@ -1772,7 +1772,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));
|
||||||
|
|
@ -1781,7 +1781,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);
|
||||||
|
|
@ -2408,7 +2408,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
|
||||||
|
|
|
||||||
|
|
@ -728,6 +728,8 @@ class Creature : public Unit
|
||||||
|
|
||||||
void SetVirtualItem(VirtualItemSlot slot, uint32 item_id) { SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + slot, item_id); }
|
void SetVirtualItem(VirtualItemSlot slot, uint32 item_id) { SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + slot, item_id); }
|
||||||
|
|
||||||
|
bool IsReputationGainDisabled() { return DisableReputationGain; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool MeetsSelectAttackingRequirement(Unit* pTarget, SpellEntry const* pSpellInfo, uint32 selectFlags) const;
|
bool MeetsSelectAttackingRequirement(Unit* pTarget, SpellEntry const* pSpellInfo, uint32 selectFlags) const;
|
||||||
|
|
||||||
|
|
@ -779,7 +781,9 @@ class Creature : public Unit
|
||||||
float m_combatStartY;
|
float m_combatStartY;
|
||||||
float m_combatStartZ;
|
float m_combatStartZ;
|
||||||
|
|
||||||
Position m_respawnPos;
|
Position m_respawnPos;
|
||||||
|
|
||||||
|
bool DisableReputationGain;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GridReference<Creature> m_gridRef;
|
GridReference<Creature> m_gridRef;
|
||||||
|
|
|
||||||
|
|
@ -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");
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
|
|
|
||||||
|
|
@ -1058,10 +1058,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 { return m_isInWater; }
|
bool IsInWater() const override
|
||||||
bool IsUnderWater() const override;
|
{
|
||||||
|
return m_isInWater;
|
||||||
|
}
|
||||||
|
bool IsUnderWater() const override;
|
||||||
|
bool IsFalling()
|
||||||
|
{
|
||||||
|
return GetPositionZ() < m_lastFallZ;
|
||||||
|
}
|
||||||
|
|
||||||
void SendInitialPacketsBeforeAddToMap();
|
void SendInitialPacketsBeforeAddToMap();
|
||||||
void SendInitialPacketsAfterAddToMap();
|
void SendInitialPacketsAfterAddToMap();
|
||||||
|
|
@ -1095,7 +1102,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);
|
||||||
|
|
|
||||||
|
|
@ -8312,7 +8312,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
|
||||||
|
|
@ -8355,7 +8355,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
|
||||||
|
|
|
||||||
|
|
@ -1684,13 +1684,18 @@ 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 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()
|
||||||
* @return the current percent of the health
|
* @return the current percent of the health
|
||||||
* \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 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
|
||||||
|
|
@ -2159,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 |
|
||||||
|
|
@ -2178,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); }
|
||||||
|
|
||||||
|
|
@ -2558,9 +2563,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
|
||||||
|
* for the value \ref DeathState::ALIVE
|
||||||
|
* @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 IsDead() const { return (m_deathState == DEAD || m_deathState == CORPSE); };
|
bool IsDying() const { return (m_deathState == JUST_DIED); }
|
||||||
DeathState getDeathState() const { return m_deathState; };
|
/**
|
||||||
|
* 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
|
||||||
|
* @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); };
|
||||||
|
/**
|
||||||
|
* Returns the current \ref DeathState for this \ref Unit.
|
||||||
|
* @return the value of the member \ref Unit::m_deathState
|
||||||
|
*/
|
||||||
|
DeathState getDeathState() const { return m_deathState; };
|
||||||
|
/**
|
||||||
|
* 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,
|
||||||
|
* 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
|
||||||
|
* @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); }
|
||||||
|
|
@ -2708,7 +2736,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
|
||||||
|
|
@ -3052,6 +3080,7 @@ class Unit : public WorldObject
|
||||||
SpellSchools GetSpellSchoolByAuraGroup(UnitMods unitMod) const;
|
SpellSchools GetSpellSchoolByAuraGroup(UnitMods unitMod) const;
|
||||||
Stats GetStatByAuraGroup(UnitMods unitMod) const;
|
Stats GetStatByAuraGroup(UnitMods unitMod) const;
|
||||||
Powers GetPowerTypeByAuraGroup(UnitMods unitMod) const;
|
Powers GetPowerTypeByAuraGroup(UnitMods unitMod) const;
|
||||||
|
void SetPowerType(Powers new_powertype);
|
||||||
bool CanModifyStats() const { return m_canModifyStats; }
|
bool CanModifyStats() const { return m_canModifyStats; }
|
||||||
void SetCanModifyStats(bool modifyStats) { m_canModifyStats = modifyStats; }
|
void SetCanModifyStats(bool modifyStats) { m_canModifyStats = modifyStats; }
|
||||||
virtual bool UpdateStats(Stats stat) = 0;
|
virtual bool UpdateStats(Stats stat) = 0;
|
||||||
|
|
|
||||||
|
|
@ -257,7 +257,8 @@ class WorldSession
|
||||||
void SendLfgSearchResults(LfgType type, uint32 entry);
|
void SendLfgSearchResults(LfgType type, uint32 entry);
|
||||||
void SendLfgJoinResult(LfgJoinResult result);
|
void SendLfgJoinResult(LfgJoinResult result);
|
||||||
void SendLfgUpdate(bool isGroup, LfgUpdateType updateType, uint32 id);
|
void SendLfgUpdate(bool isGroup, LfgUpdateType updateType, uint32 id);
|
||||||
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 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);
|
||||||
|
|
|
||||||
|
|
@ -846,7 +846,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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,17 @@ void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket)
|
||||||
sGuildMgr.AddGuild(guild);
|
sGuildMgr.AddGuild(guild);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WorldSession::SendGuildInvite(Player* player, bool alreadyInGuild /*= false*/)
|
||||||
|
{
|
||||||
|
Guild* guild = sGuildMgr.GetGuildById(GetPlayer()->GetGuildId());
|
||||||
|
player->SetGuildIdInvited(GetPlayer()->GetGuildId());
|
||||||
|
|
||||||
|
WorldPacket data(SMSG_GUILD_INVITE, (8 + 10)); // guess size
|
||||||
|
data << GetPlayer()->GetName();
|
||||||
|
data << guild->GetName();
|
||||||
|
player->GetSession()->SendPacket(&data); // unk
|
||||||
|
}
|
||||||
|
|
||||||
void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
|
void WorldSession::HandleGuildInviteOpcode(WorldPacket& recvPacket)
|
||||||
{
|
{
|
||||||
DEBUG_LOG("WORLD: Received opcode CMSG_GUILD_INVITE");
|
DEBUG_LOG("WORLD: Received opcode CMSG_GUILD_INVITE");
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -534,14 +534,14 @@ namespace LuaPlayer
|
||||||
/**
|
/**
|
||||||
* Returns 'true' if the [Player] has taxi cheat activated, 'false' otherwise.
|
* Returns 'true' if the [Player] has taxi cheat activated, 'false' otherwise.
|
||||||
*
|
*
|
||||||
* @return bool isTaxiCheater
|
* @return bool IsTaxiCheater
|
||||||
*/
|
*/
|
||||||
int IsTaxiCheater(Eluna* /*E*/, lua_State* L, Player* player)
|
int IsTaxiCheater(Eluna* /*E*/, lua_State* L, Player* player)
|
||||||
{
|
{
|
||||||
#ifdef MANGOS
|
#ifdef MANGOS
|
||||||
Eluna::Push(L, player->IsTaxiCheater());
|
Eluna::Push(L, player->IsTaxiCheater());
|
||||||
#else
|
#else
|
||||||
Eluna::Push(L, player->isTaxiCheater());
|
Eluna::Push(L, player->IsTaxiCheater());
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -130,12 +130,12 @@ namespace LuaUnit
|
||||||
/**
|
/**
|
||||||
* Returns true if the [Unit] a guild master.
|
* Returns true if the [Unit] a guild master.
|
||||||
*
|
*
|
||||||
* @return bool isGuildMaster
|
* @return bool IsGuildMaster
|
||||||
*/
|
*/
|
||||||
int IsGuildMaster(Eluna* /*E*/, lua_State* L, Unit* unit)
|
int IsGuildMaster(Eluna* /*E*/, lua_State* L, Unit* unit)
|
||||||
{
|
{
|
||||||
#ifdef CMANGOS
|
#ifdef CMANGOS
|
||||||
Eluna::Push(L, unit->isGuildMaster());
|
Eluna::Push(L, unit->IsGuildMaster());
|
||||||
#else
|
#else
|
||||||
Eluna::Push(L, unit->IsGuildMaster());
|
Eluna::Push(L, unit->IsGuildMaster());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -145,12 +145,12 @@ namespace LuaUnit
|
||||||
/**
|
/**
|
||||||
* Returns true if the [Unit] an innkeeper.
|
* Returns true if the [Unit] an innkeeper.
|
||||||
*
|
*
|
||||||
* @return bool isInnkeeper
|
* @return bool IsInnkeeper
|
||||||
*/
|
*/
|
||||||
int IsInnkeeper(Eluna* /*E*/, lua_State* L, Unit* unit)
|
int IsInnkeeper(Eluna* /*E*/, lua_State* L, Unit* unit)
|
||||||
{
|
{
|
||||||
#ifdef CMANGOS
|
#ifdef CMANGOS
|
||||||
Eluna::Push(L, unit->isInnkeeper());
|
Eluna::Push(L, unit->IsInnkeeper());
|
||||||
#else
|
#else
|
||||||
Eluna::Push(L, unit->IsInnkeeper());
|
Eluna::Push(L, unit->IsInnkeeper());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -180,7 +180,7 @@ namespace LuaUnit
|
||||||
int IsGossip(Eluna* /*E*/, lua_State* L, Unit* unit)
|
int IsGossip(Eluna* /*E*/, lua_State* L, Unit* unit)
|
||||||
{
|
{
|
||||||
#ifdef CMANGOS
|
#ifdef CMANGOS
|
||||||
Eluna::Push(L, unit->isGossip());
|
Eluna::Push(L, unit->IsGossip());
|
||||||
#else
|
#else
|
||||||
Eluna::Push(L, unit->IsGossip());
|
Eluna::Push(L, unit->IsGossip());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -190,12 +190,12 @@ namespace LuaUnit
|
||||||
/**
|
/**
|
||||||
* Returns true if the [Unit] is a taxi master.
|
* Returns true if the [Unit] is a taxi master.
|
||||||
*
|
*
|
||||||
* @return bool isTaxi
|
* @return bool IsTaxi
|
||||||
*/
|
*/
|
||||||
int IsTaxi(Eluna* /*E*/, lua_State* L, Unit* unit)
|
int IsTaxi(Eluna* /*E*/, lua_State* L, Unit* unit)
|
||||||
{
|
{
|
||||||
#ifdef CMANGOS
|
#ifdef CMANGOS
|
||||||
Eluna::Push(L, unit->isTaxi());
|
Eluna::Push(L, unit->IsTaxi());
|
||||||
#else
|
#else
|
||||||
Eluna::Push(L, unit->IsTaxi());
|
Eluna::Push(L, unit->IsTaxi());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -205,12 +205,12 @@ namespace LuaUnit
|
||||||
/**
|
/**
|
||||||
* Returns true if the [Unit] is a spirit healer.
|
* Returns true if the [Unit] is a spirit healer.
|
||||||
*
|
*
|
||||||
* @return bool isSpiritHealer
|
* @return bool IsSpiritHealer
|
||||||
*/
|
*/
|
||||||
int IsSpiritHealer(Eluna* /*E*/, lua_State* L, Unit* unit)
|
int IsSpiritHealer(Eluna* /*E*/, lua_State* L, Unit* unit)
|
||||||
{
|
{
|
||||||
#ifdef CMANGOS
|
#ifdef CMANGOS
|
||||||
Eluna::Push(L, unit->isSpiritHealer());
|
Eluna::Push(L, unit->IsSpiritHealer());
|
||||||
#else
|
#else
|
||||||
Eluna::Push(L, unit->IsSpiritHealer());
|
Eluna::Push(L, unit->IsSpiritHealer());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -220,12 +220,12 @@ namespace LuaUnit
|
||||||
/**
|
/**
|
||||||
* Returns true if the [Unit] is a spirit guide.
|
* Returns true if the [Unit] is a spirit guide.
|
||||||
*
|
*
|
||||||
* @return bool isSpiritGuide
|
* @return bool IsSpiritGuide
|
||||||
*/
|
*/
|
||||||
int IsSpiritGuide(Eluna* /*E*/, lua_State* L, Unit* unit)
|
int IsSpiritGuide(Eluna* /*E*/, lua_State* L, Unit* unit)
|
||||||
{
|
{
|
||||||
#ifdef CMANGOS
|
#ifdef CMANGOS
|
||||||
Eluna::Push(L, unit->isSpiritGuide());
|
Eluna::Push(L, unit->IsSpiritGuide());
|
||||||
#else
|
#else
|
||||||
Eluna::Push(L, unit->IsSpiritGuide());
|
Eluna::Push(L, unit->IsSpiritGuide());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -235,12 +235,12 @@ namespace LuaUnit
|
||||||
/**
|
/**
|
||||||
* Returns true if the [Unit] is a tabard designer.
|
* Returns true if the [Unit] is a tabard designer.
|
||||||
*
|
*
|
||||||
* @return bool isTabardDesigner
|
* @return bool IsTabardDesigner
|
||||||
*/
|
*/
|
||||||
int IsTabardDesigner(Eluna* /*E*/, lua_State* L, Unit* unit)
|
int IsTabardDesigner(Eluna* /*E*/, lua_State* L, Unit* unit)
|
||||||
{
|
{
|
||||||
#ifdef CMANGOS
|
#ifdef CMANGOS
|
||||||
Eluna::Push(L, unit->isTabardDesigner());
|
Eluna::Push(L, unit->IsTabardDesigner());
|
||||||
#else
|
#else
|
||||||
Eluna::Push(L, unit->IsTabardDesigner());
|
Eluna::Push(L, unit->IsTabardDesigner());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -250,12 +250,12 @@ namespace LuaUnit
|
||||||
/**
|
/**
|
||||||
* Returns true if the [Unit] provides services like vendor, training and auction.
|
* Returns true if the [Unit] provides services like vendor, training and auction.
|
||||||
*
|
*
|
||||||
* @return bool isTabardDesigner
|
* @return bool IsServiceProvider
|
||||||
*/
|
*/
|
||||||
int IsServiceProvider(Eluna* /*E*/, lua_State* L, Unit* unit)
|
int IsServiceProvider(Eluna* /*E*/, lua_State* L, Unit* unit)
|
||||||
{
|
{
|
||||||
#ifdef CMANGOS
|
#ifdef CMANGOS
|
||||||
Eluna::Push(L, unit->isServiceProvider());
|
Eluna::Push(L, unit->IsServiceProvider());
|
||||||
#else
|
#else
|
||||||
Eluna::Push(L, unit->IsServiceProvider());
|
Eluna::Push(L, unit->IsServiceProvider());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -265,12 +265,12 @@ namespace LuaUnit
|
||||||
/**
|
/**
|
||||||
* Returns true if the [Unit] is a spirit guide or spirit healer.
|
* Returns true if the [Unit] is a spirit guide or spirit healer.
|
||||||
*
|
*
|
||||||
* @return bool isSpiritService
|
* @return bool IsSpiritService
|
||||||
*/
|
*/
|
||||||
int IsSpiritService(Eluna* /*E*/, lua_State* L, Unit* unit)
|
int IsSpiritService(Eluna* /*E*/, lua_State* L, Unit* unit)
|
||||||
{
|
{
|
||||||
#ifdef CMANGOS
|
#ifdef CMANGOS
|
||||||
Eluna::Push(L, unit->isSpiritService());
|
Eluna::Push(L, unit->IsSpiritService());
|
||||||
#else
|
#else
|
||||||
Eluna::Push(L, unit->IsSpiritService());
|
Eluna::Push(L, unit->IsSpiritService());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -310,14 +310,14 @@ namespace LuaUnit
|
||||||
/**
|
/**
|
||||||
* Returns true if the [Unit] is dying.
|
* Returns true if the [Unit] is dying.
|
||||||
*
|
*
|
||||||
* @return bool isDying
|
* @return bool IsDying
|
||||||
*/
|
*/
|
||||||
int IsDying(Eluna* /*E*/, lua_State* L, Unit* unit)
|
int IsDying(Eluna* /*E*/, lua_State* L, Unit* unit)
|
||||||
{
|
{
|
||||||
#ifdef MANGOS
|
#ifdef MANGOS
|
||||||
Eluna::Push(L, unit->IsDying());
|
Eluna::Push(L, unit->IsDying());
|
||||||
#else
|
#else
|
||||||
Eluna::Push(L, unit->isDying());
|
Eluna::Push(L, unit->IsDying());
|
||||||
#endif
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
@ -325,12 +325,12 @@ namespace LuaUnit
|
||||||
/**
|
/**
|
||||||
* Returns true if the [Unit] is a banker.
|
* Returns true if the [Unit] is a banker.
|
||||||
*
|
*
|
||||||
* @return bool isBanker
|
* @return bool IsBanker
|
||||||
*/
|
*/
|
||||||
int IsBanker(Eluna* /*E*/, lua_State* L, Unit* unit)
|
int IsBanker(Eluna* /*E*/, lua_State* L, Unit* unit)
|
||||||
{
|
{
|
||||||
#ifdef CMANGOS
|
#ifdef CMANGOS
|
||||||
Eluna::Push(L, unit->isBanker());
|
Eluna::Push(L, unit->IsBanker());
|
||||||
#else
|
#else
|
||||||
Eluna::Push(L, unit->IsBanker());
|
Eluna::Push(L, unit->IsBanker());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -355,12 +355,12 @@ namespace LuaUnit
|
||||||
/**
|
/**
|
||||||
* Returns true if the [Unit] is a battle master.
|
* Returns true if the [Unit] is a battle master.
|
||||||
*
|
*
|
||||||
* @return bool isBattleMaster
|
* @return bool IsBattleMaster
|
||||||
*/
|
*/
|
||||||
int IsBattleMaster(Eluna* /*E*/, lua_State* L, Unit* unit)
|
int IsBattleMaster(Eluna* /*E*/, lua_State* L, Unit* unit)
|
||||||
{
|
{
|
||||||
#ifdef CMANGOS
|
#ifdef CMANGOS
|
||||||
Eluna::Push(L, unit->isBattleMaster());
|
Eluna::Push(L, unit->IsBattleMaster());
|
||||||
#else
|
#else
|
||||||
Eluna::Push(L, unit->IsBattleMaster());
|
Eluna::Push(L, unit->IsBattleMaster());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -370,12 +370,12 @@ namespace LuaUnit
|
||||||
/**
|
/**
|
||||||
* Returns true if the [Unit] is a charmed.
|
* Returns true if the [Unit] is a charmed.
|
||||||
*
|
*
|
||||||
* @return bool isCharmed
|
* @return bool IsCharmed
|
||||||
*/
|
*/
|
||||||
int IsCharmed(Eluna* /*E*/, lua_State* L, Unit* unit)
|
int IsCharmed(Eluna* /*E*/, lua_State* L, Unit* unit)
|
||||||
{
|
{
|
||||||
#ifdef CMANGOS
|
#ifdef CMANGOS
|
||||||
Eluna::Push(L, unit->isCharmed());
|
Eluna::Push(L, unit->IsCharmed());
|
||||||
#else
|
#else
|
||||||
Eluna::Push(L, unit->IsCharmed());
|
Eluna::Push(L, unit->IsCharmed());
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -385,12 +385,12 @@ namespace LuaUnit
|
||||||
/**
|
/**
|
||||||
* Returns true if the [Unit] is an armorer and can repair equipment.
|
* Returns true if the [Unit] is an armorer and can repair equipment.
|
||||||
*
|
*
|
||||||
* @return bool isArmorer
|
* @return bool IsArmorer
|
||||||
*/
|
*/
|
||||||
int IsArmorer(Eluna* /*E*/, lua_State* L, Unit* unit)
|
int IsArmorer(Eluna* /*E*/, lua_State* L, Unit* unit)
|
||||||
{
|
{
|
||||||
#ifdef CMANGOS
|
#ifdef CMANGOS
|
||||||
Eluna::Push(L, unit->isArmorer());
|
Eluna::Push(L, unit->IsArmorer());
|
||||||
#else
|
#else
|
||||||
Eluna::Push(L, unit->IsArmorer());
|
Eluna::Push(L, unit->IsArmorer());
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue