mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
Backports from 400 branch.
This commit is contained in:
parent
bf774f49ce
commit
76dfdd336f
32 changed files with 223 additions and 210 deletions
|
|
@ -741,18 +741,17 @@ bool Player::Create( uint32 guidlow, const std::string& name, uint8 race, uint8
|
|||
// apply original stats mods before spell loading or item equipment that call before equip _RemoveStatsMods()
|
||||
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));
|
||||
SetPower(POWER_MANA, GetMaxPower(POWER_MANA));
|
||||
}
|
||||
|
||||
if(getPowerType() == POWER_RUNIC_POWER)
|
||||
if(getPowerType() != POWER_MANA) // hide additional mana bar if we have no mana
|
||||
{
|
||||
SetPower(POWER_RUNE, 8);
|
||||
SetMaxPower(POWER_RUNE, 8);
|
||||
SetPower(POWER_RUNIC_POWER, 0);
|
||||
SetMaxPower(POWER_RUNIC_POWER, 1000);
|
||||
SetPower(POWER_MANA, 0);
|
||||
SetMaxPower(POWER_MANA, 0);
|
||||
}
|
||||
|
||||
// original spells
|
||||
|
|
@ -3354,7 +3353,7 @@ bool Player::IsNeedCastPassiveSpellAtLearn(SpellEntry const* spellInfo) const
|
|||
bool need_cast = (!spellInfo->Stances || (m_form != 0 && (spellInfo->Stances & (1<<(m_form-1)))) ||
|
||||
(m_form == 0 && (spellInfo->AttributesEx2 & SPELL_ATTR_EX2_NOT_NEED_SHAPESHIFT)));
|
||||
|
||||
//Check CasterAuraStates
|
||||
// Check CasterAuraStates
|
||||
return need_cast && (!spellInfo->CasterAuraState || HasAuraState(AuraState(spellInfo->CasterAuraState)));
|
||||
}
|
||||
|
||||
|
|
@ -7242,7 +7241,7 @@ void Player::_ApplyItemBonuses(ItemPrototype const *proto, uint8 slot, bool appl
|
|||
if (int32 feral_bonus = ssv->getFeralBonus(proto->ScalingStatValue))
|
||||
ApplyFeralAPBonus(feral_bonus, apply);
|
||||
}
|
||||
// Druids get feral AP bonus from weapon dps (lso use DPS from ScalingStatValue)
|
||||
// Druids get feral AP bonus from weapon dps (also use DPS from ScalingStatValue)
|
||||
if(getClass() == CLASS_DRUID)
|
||||
{
|
||||
int32 feral_bonus = proto->getFeralBonus(extraDPS);
|
||||
|
|
@ -14149,7 +14148,7 @@ bool Player::SatisfyQuestDay(Quest const* qInfo, bool msg) const
|
|||
if (!have_slot)
|
||||
{
|
||||
if (msg)
|
||||
SendCanTakeQuestResponse(INVALIDREASON_DAILY_QUESTS_REMAINING);
|
||||
SendCanTakeQuestResponse(INVALIDREASON_QUEST_FAILED_TOO_MANY_DAILY_QUESTS);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
@ -14815,13 +14814,13 @@ void Player::SendQuestReward( Quest const *pQuest, uint32 XP, Object * questGive
|
|||
GetMap()->ScriptsStart(sQuestEndScripts, pQuest->GetQuestCompleteScript(), questGiver, this);
|
||||
}
|
||||
|
||||
void Player::SendQuestFailed( uint32 quest_id )
|
||||
void Player::SendQuestFailed( uint32 quest_id, InventoryChangeFailure reason)
|
||||
{
|
||||
if( quest_id )
|
||||
{
|
||||
WorldPacket data( SMSG_QUESTGIVER_QUEST_FAILED, 4+4 );
|
||||
data << uint32(quest_id);
|
||||
data << uint32(0); // failed reason (4 for inventory is full)
|
||||
data << uint32(reason); // failed reason (valid reasons: 4, 16, 50, 17, 74, other values show default message)
|
||||
GetSession()->SendPacket( &data );
|
||||
DEBUG_LOG("WORLD: Sent SMSG_QUESTGIVER_QUEST_FAILED");
|
||||
}
|
||||
|
|
@ -18636,7 +18635,7 @@ void Player::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs )
|
|||
|
||||
void Player::InitDataForForm(bool reapplyMods)
|
||||
{
|
||||
SpellShapeshiftEntry const* ssEntry = sSpellShapeshiftStore.LookupEntry(m_form);
|
||||
SpellShapeshiftFormEntry const* ssEntry = sSpellShapeshiftFormStore.LookupEntry(m_form);
|
||||
if(ssEntry && ssEntry->attackSpeed)
|
||||
{
|
||||
SetAttackTime(BASE_ATTACK,ssEntry->attackSpeed);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue