mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[9861] Backporting some code chnages from 400 branch.
(based on 400's commit 0f37423) (based on 400's commit 636cfef) (based on 400's commit 0bbe3a7) (based on 400's commit ce86b56) (based on 400's commit b74c6a8)
This commit is contained in:
parent
a0d9ffcc5f
commit
ff2cda6af1
18 changed files with 68 additions and 43 deletions
|
|
@ -2622,7 +2622,7 @@ void Player::InitStatsForLevel(bool reapplyMods)
|
|||
SetUInt32Value(index, 0);
|
||||
|
||||
SetUInt32Value(PLAYER_FIELD_MOD_HEALING_DONE_POS,0);
|
||||
for (int i = 0; i < 7; ++i)
|
||||
for (int i = 0; i < MAX_SPELL_SCHOOL; ++i)
|
||||
{
|
||||
SetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG+i, 0);
|
||||
SetUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS+i, 0);
|
||||
|
|
@ -2654,7 +2654,7 @@ void Player::InitStatsForLevel(bool reapplyMods)
|
|||
SetFloatValue(PLAYER_RANGED_CRIT_PERCENTAGE,0.0f);
|
||||
|
||||
// Init spell schools (will be recalculated in UpdateAllStats() at loading and in _ApplyAllStatBonuses() at reset
|
||||
for (uint8 i = 0; i < 7; ++i)
|
||||
for (uint8 i = 0; i < MAX_SPELL_SCHOOL; ++i)
|
||||
SetFloatValue(PLAYER_SPELL_CRIT_PERCENTAGE1+i, 0.0f);
|
||||
|
||||
SetFloatValue(PLAYER_PARRY_PERCENTAGE, 0.0f);
|
||||
|
|
@ -2691,7 +2691,7 @@ void Player::InitStatsForLevel(bool reapplyMods)
|
|||
|
||||
// save new stats
|
||||
for (int i = POWER_MANA; i < MAX_POWERS; ++i)
|
||||
SetMaxPower(Powers(i), uint32(GetCreatePowers(Powers(i))));
|
||||
SetMaxPower(Powers(i), GetCreatePowers(Powers(i)));
|
||||
|
||||
SetMaxHealth(classInfo.basehealth); // stamina bonus will applied later
|
||||
|
||||
|
|
@ -14922,7 +14922,6 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
|||
SetUInt32Value(PLAYER_AMMO_ID, fields[62].GetUInt32());
|
||||
SetByteValue(PLAYER_FIELD_BYTES, 2, fields[64].GetUInt8());
|
||||
|
||||
|
||||
InitDisplayIds();
|
||||
|
||||
// cleanup inventory related item value fields (its will be filled correctly in _LoadInventory)
|
||||
|
|
@ -15216,7 +15215,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
|
|||
SetUInt32Value(PLAYER_TRACK_CREATURES, 0 );
|
||||
SetUInt32Value(PLAYER_TRACK_RESOURCES, 0 );
|
||||
|
||||
// cleanup aura list explicitly before skill load wher some spells can be applied
|
||||
// cleanup aura list explicitly before skill load where some spells can be applied
|
||||
RemoveAllAuras();
|
||||
|
||||
// make sure the unit is considered out of combat for proper loading
|
||||
|
|
@ -17436,7 +17435,7 @@ void Player::RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent)
|
|||
|
||||
if(spellInfo)
|
||||
{
|
||||
for(uint32 i = 0; i < 7; ++i)
|
||||
for(uint32 i = 0; i < MAX_REAGENTS; ++i)
|
||||
{
|
||||
if(spellInfo->Reagent[i] > 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue