Core/PacketIO: Updated packet structures to 9.0.2
Port From (https://github.com/TrinityCore/TrinityCore/commit/96d340f70ccef57fad177a24ca099055d7dce04d)
This commit is contained in:
@@ -53,7 +53,10 @@ namespace Game.Spells
|
||||
Duration = 0x04,
|
||||
Scalable = 0x08,
|
||||
Negative = 0x10,
|
||||
Unk20 = 0x20
|
||||
Unk20 = 0x20,
|
||||
Unk40 = 0x40,
|
||||
Unk80 = 0x80,
|
||||
MawPower = 0x100
|
||||
}
|
||||
|
||||
public class AuraApplication
|
||||
|
||||
@@ -3947,23 +3947,6 @@ namespace Game.Spells
|
||||
target.ToPlayer().ApplyRatingMod((CombatRating)rating, GetAmount(), apply);
|
||||
}
|
||||
|
||||
[AuraEffectHandler(AuraType.ModRatingFromStat)]
|
||||
void HandleModRatingFromStat(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
||||
{
|
||||
if (!mode.HasAnyFlag((AuraEffectHandleModes.ChangeAmountMask | AuraEffectHandleModes.Stat)))
|
||||
return;
|
||||
|
||||
Unit target = aurApp.GetTarget();
|
||||
|
||||
if (!target.IsTypeId(TypeId.Player))
|
||||
return;
|
||||
|
||||
// Just recalculate ratings
|
||||
for (int rating = 0; rating < (int)CombatRating.Max; ++rating)
|
||||
if (Convert.ToBoolean(GetMiscValue() & (1 << rating)))
|
||||
target.ToPlayer().UpdateRating((CombatRating)rating);
|
||||
}
|
||||
|
||||
[AuraEffectHandler(AuraType.ModRatingPct)]
|
||||
void HandleModRatingPct(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
||||
{
|
||||
@@ -4155,20 +4138,6 @@ namespace Game.Spells
|
||||
/********************************/
|
||||
/*** POWER COST ***/
|
||||
/********************************/
|
||||
[AuraEffectHandler(AuraType.ModPowerCostSchoolPct)]
|
||||
void HandleModPowerCostPCT(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
||||
{
|
||||
if (!mode.HasAnyFlag(AuraEffectHandleModes.ChangeAmountMask))
|
||||
return;
|
||||
|
||||
Unit target = aurApp.GetTarget();
|
||||
|
||||
float amount = MathFunctions.CalculatePct(1.0f, GetAmount());
|
||||
for (int i = 0; i < (int)SpellSchools.Max; ++i)
|
||||
if (Convert.ToBoolean(GetMiscValue() & (1 << i)))
|
||||
target.ApplyModPowerCostMultiplier((SpellSchools)i, amount, apply);
|
||||
}
|
||||
|
||||
[AuraEffectHandler(AuraType.ModPowerCostSchool)]
|
||||
void HandleModPowerCost(AuraApplication aurApp, AuraEffectHandleModes mode, bool apply)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user