mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core/Entities: Update updatefields to 8.0.1.27980
This commit is contained in:
@@ -234,7 +234,7 @@ public:
|
||||
{
|
||||
player->GiveLevel(newLevel);
|
||||
player->InitTalentForLevel();
|
||||
player->SetUInt32Value(PLAYER_XP, 0);
|
||||
player->SetUInt32Value(ACTIVE_PLAYER_FIELD_XP, 0);
|
||||
|
||||
if (handler->needReportToTarget(player))
|
||||
{
|
||||
|
||||
@@ -276,9 +276,9 @@ public:
|
||||
for (uint16 i = 0; i < PLAYER_EXPLORED_ZONES_SIZE; ++i)
|
||||
{
|
||||
if (flag != 0)
|
||||
handler->GetSession()->GetPlayer()->SetFlag(PLAYER_EXPLORED_ZONES_1+i, 0xFFFFFFFF);
|
||||
handler->GetSession()->GetPlayer()->SetFlag(ACTIVE_PLAYER_FIELD_EXPLORED_ZONES + i, 0xFFFFFFFF);
|
||||
else
|
||||
handler->GetSession()->GetPlayer()->SetFlag(PLAYER_EXPLORED_ZONES_1+i, 0);
|
||||
handler->GetSession()->GetPlayer()->SetFlag(ACTIVE_PLAYER_FIELD_EXPLORED_ZONES + i, 0);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -1203,8 +1203,8 @@ public:
|
||||
}
|
||||
|
||||
uint32 val = uint32((1 << (area->AreaBit % 32)));
|
||||
uint32 currFields = playerTarget->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset);
|
||||
playerTarget->SetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset, uint32((currFields | val)));
|
||||
uint32 currFields = playerTarget->GetUInt32Value(ACTIVE_PLAYER_FIELD_EXPLORED_ZONES + offset);
|
||||
playerTarget->SetUInt32Value(ACTIVE_PLAYER_FIELD_EXPLORED_ZONES + offset, uint32((currFields | val)));
|
||||
|
||||
handler->SendSysMessage(LANG_EXPLORE_AREA);
|
||||
return true;
|
||||
@@ -1247,8 +1247,8 @@ public:
|
||||
}
|
||||
|
||||
uint32 val = uint32((1 << (area->AreaBit % 32)));
|
||||
uint32 currFields = playerTarget->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset);
|
||||
playerTarget->SetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset, uint32((currFields ^ val)));
|
||||
uint32 currFields = playerTarget->GetUInt32Value(ACTIVE_PLAYER_FIELD_EXPLORED_ZONES + offset);
|
||||
playerTarget->SetUInt32Value(ACTIVE_PLAYER_FIELD_EXPLORED_ZONES + offset, uint32((currFields ^ val)));
|
||||
|
||||
handler->SendSysMessage(LANG_UNEXPLORE_AREA);
|
||||
return true;
|
||||
|
||||
@@ -83,8 +83,8 @@ public:
|
||||
if (!handler->extractPlayerTarget((char*)args, &target))
|
||||
return false;
|
||||
|
||||
target->SetUInt32Value(PLAYER_FIELD_KILLS, 0);
|
||||
target->SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS, 0);
|
||||
target->SetUInt32Value(ACTIVE_PLAYER_FIELD_KILLS, 0);
|
||||
target->SetUInt32Value(ACTIVE_PLAYER_FIELD_LIFETIME_HONORABLE_KILLS, 0);
|
||||
target->UpdateCriteria(CRITERIA_TYPE_EARN_HONORABLE_KILL);
|
||||
|
||||
return true;
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
player->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
|
||||
|
||||
//-1 is default value
|
||||
player->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, uint32(-1));
|
||||
player->SetUInt32Value(ACTIVE_PLAYER_FIELD_WATCHED_FACTION_INDEX, uint32(-1));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
target->InitStatsForLevel(true);
|
||||
target->InitTaxiNodesForLevel();
|
||||
target->InitTalentForLevel();
|
||||
target->SetUInt32Value(PLAYER_XP, 0);
|
||||
target->SetUInt32Value(ACTIVE_PLAYER_FIELD_XP, 0);
|
||||
|
||||
target->_ApplyAllLevelScaleItemMods(true);
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
|
||||
titles &= ~titles2; // remove non-existing titles
|
||||
|
||||
target->SetUInt64Value(PLAYER__FIELD_KNOWN_TITLES, titles);
|
||||
target->SetUInt64Value(ACTIVE_PLAYER_FIELD_KNOWN_TITLES, titles);
|
||||
handler->SendSysMessage(LANG_DONE);
|
||||
|
||||
if (!target->HasTitle(target->GetInt32Value(PLAYER_CHOSEN_TITLE)))
|
||||
|
||||
@@ -173,7 +173,7 @@ class boss_sapphiron : public CreatureScript
|
||||
switch(spell->Id)
|
||||
{
|
||||
case SPELL_CHECK_RESISTS:
|
||||
if (target && target->GetResistance(SPELL_SCHOOL_FROST) > MAX_FROST_RESISTANCE)
|
||||
if (target && target->GetResistance(SPELL_SCHOOL_MASK_FROST) > MAX_FROST_RESISTANCE)
|
||||
_canTheHundredClub = false;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ class boss_high_astromancer_solarian : public CreatureScript
|
||||
{
|
||||
Initialize();
|
||||
_Reset();
|
||||
me->SetArmor(defaultarmor);
|
||||
me->SetArmor(defaultarmor, 0);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetVisible(true);
|
||||
me->SetObjectScale(defaultsize);
|
||||
@@ -403,7 +403,7 @@ class boss_high_astromancer_solarian : public CreatureScript
|
||||
me->SetVisible(true);
|
||||
Talk(SAY_VOIDA);
|
||||
Talk(SAY_VOIDB);
|
||||
me->SetArmor(WV_ARMOR);
|
||||
me->SetArmor(WV_ARMOR, 0);
|
||||
me->SetDisplayId(MODEL_VOIDWALKER);
|
||||
me->SetObjectScale(defaultsize*2.5f);
|
||||
}
|
||||
|
||||
@@ -300,8 +300,8 @@ public:
|
||||
|
||||
if (Unit* owner = pet->ToPet()->GetOwner())
|
||||
{
|
||||
int32 fire = owner->GetInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FIRE) - owner->GetInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_FIRE);
|
||||
int32 shadow = owner->GetInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_SHADOW) - owner->GetInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_SHADOW);
|
||||
int32 fire = owner->GetInt32Value(ACTIVE_PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FIRE) - owner->GetInt32Value(ACTIVE_PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_FIRE);
|
||||
int32 shadow = owner->GetInt32Value(ACTIVE_PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_SHADOW) - owner->GetInt32Value(ACTIVE_PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_SHADOW);
|
||||
int32 maximum = (fire > shadow) ? fire : shadow;
|
||||
if (maximum < 0)
|
||||
maximum = 0;
|
||||
@@ -328,8 +328,8 @@ public:
|
||||
if (Unit* owner = pet->ToPet()->GetOwner())
|
||||
{
|
||||
//the damage bonus used for pets is either fire or shadow damage, whatever is higher
|
||||
int32 fire = owner->GetInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FIRE) - owner->GetInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_FIRE);
|
||||
int32 shadow = owner->GetInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_SHADOW) - owner->GetInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_SHADOW);
|
||||
int32 fire = owner->GetInt32Value(ACTIVE_PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FIRE) - owner->GetInt32Value(ACTIVE_PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_FIRE);
|
||||
int32 shadow = owner->GetInt32Value(ACTIVE_PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_SHADOW) - owner->GetInt32Value(ACTIVE_PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_SHADOW);
|
||||
int32 maximum = (fire > shadow) ? fire : shadow;
|
||||
float bonusDamage = 0.0f;
|
||||
|
||||
@@ -450,7 +450,7 @@ public:
|
||||
if (pet->IsPet())
|
||||
if (Unit* owner = pet->ToPet()->GetOwner())
|
||||
{
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_FIRE), 40);
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_MASK_FIRE), 40);
|
||||
amount += ownerBonus;
|
||||
}
|
||||
}
|
||||
@@ -496,7 +496,7 @@ public:
|
||||
if (pet->IsPet())
|
||||
if (Unit* owner = pet->ToPet()->GetOwner())
|
||||
{
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_FROST), 40);
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_MASK_FROST), 40);
|
||||
amount += ownerBonus;
|
||||
}
|
||||
}
|
||||
@@ -507,7 +507,7 @@ public:
|
||||
if (pet->IsPet())
|
||||
if (Unit* owner = pet->ToPet()->GetOwner())
|
||||
{
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_ARCANE), 40);
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_MASK_ARCANE), 40);
|
||||
amount += ownerBonus;
|
||||
}
|
||||
}
|
||||
@@ -518,7 +518,7 @@ public:
|
||||
if (pet->IsPet())
|
||||
if (Unit* owner = pet->ToPet()->GetOwner())
|
||||
{
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_NATURE), 40);
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_MASK_NATURE), 40);
|
||||
amount += ownerBonus;
|
||||
}
|
||||
}
|
||||
@@ -559,7 +559,7 @@ public:
|
||||
if (pet->IsPet())
|
||||
if (Unit* owner = pet->ToPet()->GetOwner())
|
||||
{
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_SHADOW), 40);
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_MASK_SHADOW), 40);
|
||||
amount += ownerBonus;
|
||||
}
|
||||
}
|
||||
@@ -1025,7 +1025,7 @@ public:
|
||||
if (!owner)
|
||||
return;
|
||||
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_FROST), 40);
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_MASK_FROST), 40);
|
||||
amount += ownerBonus;
|
||||
}
|
||||
}
|
||||
@@ -1041,7 +1041,7 @@ public:
|
||||
if (!owner)
|
||||
return;
|
||||
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_FIRE), 40);
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_MASK_FIRE), 40);
|
||||
amount += ownerBonus;
|
||||
}
|
||||
}
|
||||
@@ -1057,7 +1057,7 @@ public:
|
||||
if (!owner)
|
||||
return;
|
||||
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_NATURE), 40);
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_MASK_NATURE), 40);
|
||||
amount += ownerBonus;
|
||||
}
|
||||
}
|
||||
@@ -1103,7 +1103,7 @@ public:
|
||||
if (!owner)
|
||||
return;
|
||||
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_SHADOW), 40);
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_MASK_SHADOW), 40);
|
||||
amount += ownerBonus;
|
||||
}
|
||||
}
|
||||
@@ -1119,7 +1119,7 @@ public:
|
||||
if (!owner)
|
||||
return;
|
||||
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_ARCANE), 40);
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_MASK_ARCANE), 40);
|
||||
amount += ownerBonus;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user