mirror of
https://github.com/mangosfour/server.git
synced 2025-12-26 16:37:06 +00:00
[Build] Larger build system update
FIXED: Core now builds under cmake for Windows TODO: Map and mmap gen currently does not build TODO: More sync work is required for Eluna, thus Eluna is temporarily disabled This has only been tested under Windows with CMAKE and VS
This commit is contained in:
parent
c2f9316581
commit
13292befd6
640 changed files with 100354 additions and 29918 deletions
|
|
@ -2016,13 +2016,13 @@ bool Creature::MeetsSelectAttackingRequirement(Unit* pTarget, SpellEntry const*
|
|||
if (selectFlags & SELECT_FLAG_PLAYER && pTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
return false;
|
||||
|
||||
if (selectFlags & SELECT_FLAG_POWER_MANA && pTarget->getPowerType() != POWER_MANA)
|
||||
if (selectFlags & SELECT_FLAG_POWER_MANA && pTarget->GetPowerType() != POWER_MANA)
|
||||
return false;
|
||||
else if (selectFlags & SELECT_FLAG_POWER_RAGE && pTarget->getPowerType() != POWER_RAGE)
|
||||
else if (selectFlags & SELECT_FLAG_POWER_RAGE && pTarget->GetPowerType() != POWER_RAGE)
|
||||
return false;
|
||||
else if (selectFlags & SELECT_FLAG_POWER_ENERGY && pTarget->getPowerType() != POWER_ENERGY)
|
||||
else if (selectFlags & SELECT_FLAG_POWER_ENERGY && pTarget->GetPowerType() != POWER_ENERGY)
|
||||
return false;
|
||||
else if (selectFlags & SELECT_FLAG_POWER_RUNIC && pTarget->getPowerType() != POWER_RUNIC_POWER)
|
||||
else if (selectFlags & SELECT_FLAG_POWER_RUNIC && pTarget->GetPowerType() != POWER_RUNIC_POWER)
|
||||
return false;
|
||||
|
||||
if (selectFlags & SELECT_FLAG_IN_MELEE_RANGE && !CanReachWithMeleeAttack(pTarget))
|
||||
|
|
|
|||
|
|
@ -565,11 +565,11 @@ void Pet::RegenerateAll(uint32 update_diff)
|
|||
// regenerate focus for hunter pets or energy for deathknight's ghoul
|
||||
if (m_regenTimer <= update_diff)
|
||||
{
|
||||
switch (getPowerType())
|
||||
switch (GetPowerType())
|
||||
{
|
||||
case POWER_FOCUS:
|
||||
case POWER_ENERGY:
|
||||
Regenerate(getPowerType());
|
||||
Regenerate(GetPowerType());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -740,13 +740,13 @@ bool Player::Create(uint32 guidlow, const std::string& name, uint8 race, uint8 c
|
|||
UpdateMaxHealth(); // Update max Health (for add bonus from stamina)
|
||||
SetHealth(GetMaxHealth());
|
||||
|
||||
if (getPowerType() == POWER_MANA)
|
||||
if (GetPowerType() == POWER_MANA)
|
||||
{
|
||||
UpdateMaxPower(POWER_MANA); // Update max Mana (for add bonus from intellect)
|
||||
SetPower(POWER_MANA, GetMaxPower(POWER_MANA));
|
||||
}
|
||||
|
||||
if (getPowerType() != POWER_MANA) // hide additional mana bar if we have no mana
|
||||
if (GetPowerType() != POWER_MANA) // hide additional mana bar if we have no mana
|
||||
{
|
||||
SetPower(POWER_MANA, 0);
|
||||
SetMaxPower(POWER_MANA, 0);
|
||||
|
|
@ -19380,20 +19380,20 @@ void Player::InitDataForForm(bool reapplyMods)
|
|||
{
|
||||
case FORM_CAT:
|
||||
{
|
||||
if (getPowerType() != POWER_ENERGY)
|
||||
if (GetPowerType() != POWER_ENERGY)
|
||||
setPowerType(POWER_ENERGY);
|
||||
break;
|
||||
}
|
||||
case FORM_BEAR:
|
||||
{
|
||||
if (getPowerType() != POWER_RAGE)
|
||||
if (GetPowerType() != POWER_RAGE)
|
||||
setPowerType(POWER_RAGE);
|
||||
break;
|
||||
}
|
||||
default: // 0, for example
|
||||
{
|
||||
ChrClassesEntry const* cEntry = sChrClassesStore.LookupEntry(getClass());
|
||||
if (cEntry && cEntry->powerType < MAX_POWERS && uint32(getPowerType()) != cEntry->powerType)
|
||||
if (cEntry && cEntry->powerType < MAX_POWERS && uint32(GetPowerType()) != cEntry->powerType)
|
||||
setPowerType(Powers(cEntry->powerType));
|
||||
break;
|
||||
}
|
||||
|
|
@ -23396,7 +23396,7 @@ void Player::ActivateSpec(uint8 specNum)
|
|||
|
||||
SendInitialActionButtons();
|
||||
|
||||
Powers pw = getPowerType();
|
||||
Powers pw = GetPowerType();
|
||||
if (pw != POWER_MANA)
|
||||
SetPower(POWER_MANA, 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -887,7 +887,7 @@ uint32 Unit::DealDamage(Unit* pVictim, uint32 damage, CleanDamage const* cleanDa
|
|||
if (!damage)
|
||||
{
|
||||
// Rage from physical damage received .
|
||||
if (cleanDamage && cleanDamage->damage && (damageSchoolMask & SPELL_SCHOOL_MASK_NORMAL) && pVictim->GetTypeId() == TYPEID_PLAYER && (pVictim->getPowerType() == POWER_RAGE))
|
||||
if (cleanDamage && cleanDamage->damage && (damageSchoolMask & SPELL_SCHOOL_MASK_NORMAL) && pVictim->GetTypeId() == TYPEID_PLAYER && (pVictim->GetPowerType() == POWER_RAGE))
|
||||
((Player*)pVictim)->RewardRage(cleanDamage->damage, 0, false);
|
||||
|
||||
return 0;
|
||||
|
|
@ -936,7 +936,7 @@ uint32 Unit::DealDamage(Unit* pVictim, uint32 damage, CleanDamage const* cleanDa
|
|||
}
|
||||
|
||||
// Rage from Damage made (only from direct weapon damage)
|
||||
if (cleanDamage && damagetype == DIRECT_DAMAGE && this != pVictim && GetTypeId() == TYPEID_PLAYER && (getPowerType() == POWER_RAGE))
|
||||
if (cleanDamage && damagetype == DIRECT_DAMAGE && this != pVictim && GetTypeId() == TYPEID_PLAYER && (GetPowerType() == POWER_RAGE))
|
||||
{
|
||||
uint32 weaponSpeedHitFactor;
|
||||
|
||||
|
|
@ -1200,7 +1200,7 @@ uint32 Unit::DealDamage(Unit* pVictim, uint32 damage, CleanDamage const* cleanDa
|
|||
else // victim is a player
|
||||
{
|
||||
// Rage from damage received
|
||||
if (this != pVictim && pVictim->getPowerType() == POWER_RAGE)
|
||||
if (this != pVictim && pVictim->GetPowerType() == POWER_RAGE)
|
||||
{
|
||||
uint32 rage_damage = damage + (cleanDamage ? cleanDamage->damage : 0);
|
||||
((Player*)pVictim)->RewardRage(rage_damage, 0, false);
|
||||
|
|
@ -6673,7 +6673,7 @@ uint32 Unit::SpellDamageBonusDone(Unit* pVictim, SpellEntry const* spellProto, u
|
|||
// Add flat bonus from spell damage creature
|
||||
DoneTotal += GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_DAMAGE_DONE_CREATURE, creatureTypeMask);
|
||||
|
||||
if (getPowerType() == POWER_MANA)
|
||||
if (GetPowerType() == POWER_MANA)
|
||||
{
|
||||
Unit::AuraList const& doneFromManaPctAuras = GetAurasByType(SPELL_AURA_MOD_DAMAGE_DONE_FROM_PCT_POWER);
|
||||
if (!doneFromManaPctAuras.empty())
|
||||
|
|
@ -6817,7 +6817,7 @@ uint32 Unit::SpellDamageBonusDone(Unit* pVictim, SpellEntry const* spellProto, u
|
|||
// Ice Lance
|
||||
if (spellProto->SpellIconID == 186)
|
||||
{
|
||||
if (pVictim->isFrozen() || IsIgnoreUnitState(spellProto, IGNORE_UNIT_TARGET_NON_FROZEN))
|
||||
if (pVictim->IsFrozen() || IsIgnoreUnitState(spellProto, IGNORE_UNIT_TARGET_NON_FROZEN))
|
||||
{
|
||||
float multiplier = 3.0f;
|
||||
|
||||
|
|
@ -7164,15 +7164,15 @@ bool Unit::IsSpellCrit(Unit* pVictim, SpellEntry const* spellProto, SpellSchoolM
|
|||
switch ((*i)->GetModifier()->m_miscvalue)
|
||||
{
|
||||
case 849: // Shatter Rank 1
|
||||
if (pVictim->isFrozen() || IsIgnoreUnitState(spellProto, IGNORE_UNIT_TARGET_NON_FROZEN))
|
||||
if (pVictim->IsFrozen() || IsIgnoreUnitState(spellProto, IGNORE_UNIT_TARGET_NON_FROZEN))
|
||||
crit_chance += 17.0f;
|
||||
break;
|
||||
case 910: // Shatter Rank 2
|
||||
if (pVictim->isFrozen() || IsIgnoreUnitState(spellProto, IGNORE_UNIT_TARGET_NON_FROZEN))
|
||||
if (pVictim->IsFrozen() || IsIgnoreUnitState(spellProto, IGNORE_UNIT_TARGET_NON_FROZEN))
|
||||
crit_chance += 34.0f;
|
||||
break;
|
||||
case 911: // Shatter Rank 3
|
||||
if (pVictim->isFrozen() || IsIgnoreUnitState(spellProto, IGNORE_UNIT_TARGET_NON_FROZEN))
|
||||
if (pVictim->IsFrozen() || IsIgnoreUnitState(spellProto, IGNORE_UNIT_TARGET_NON_FROZEN))
|
||||
crit_chance += 50.0f;
|
||||
break;
|
||||
case 7917: // Glyph of Shadowburn
|
||||
|
|
@ -10593,7 +10593,7 @@ void CharmInfo::SetSpellAutocast(uint32 spell_id, bool state)
|
|||
}
|
||||
}
|
||||
|
||||
bool Unit::isFrozen() const
|
||||
bool Unit::IsFrozen() const
|
||||
{
|
||||
return HasAuraState(AURA_STATE_FROZEN);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1719,7 +1719,7 @@ class Unit : public WorldObject
|
|||
* Gets the power type for this Unit
|
||||
* @return The type of power this Unit uses
|
||||
*/
|
||||
Powers getPowerType() const { return Powers(GetByteValue(UNIT_FIELD_BYTES_0, 3)); }
|
||||
Powers GetPowerType() const { return Powers(GetByteValue(UNIT_FIELD_BYTES_0, 3)); }
|
||||
void setPowerType(Powers power);
|
||||
int32 GetPower(Powers power) const;
|
||||
int32 GetPowerByIndex(uint32 index) const;
|
||||
|
|
@ -2211,7 +2211,7 @@ class Unit : public WorldObject
|
|||
bool isInRoots() const { return HasAuraType(SPELL_AURA_MOD_ROOT); }
|
||||
bool IsPolymorphed() const;
|
||||
|
||||
bool isFrozen() const;
|
||||
bool IsFrozen() const;
|
||||
bool IsIgnoreUnitState(SpellEntry const* spell, IgnoreUnitState ignoreState);
|
||||
|
||||
bool IsTargetableForAttack(bool inversAlive = false) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue