Misc fixes/missed stuff
This commit is contained in:
@@ -487,7 +487,6 @@ namespace Framework.Constants
|
|||||||
Unattackable = InFlight,
|
Unattackable = InFlight,
|
||||||
Moving = RoamingMove | ConfusedMove | FleeingMove | ChaseMove | FollowMove,
|
Moving = RoamingMove | ConfusedMove | FleeingMove | ChaseMove | FollowMove,
|
||||||
Controlled = Confused | Stunned | Fleeing,
|
Controlled = Confused | Stunned | Fleeing,
|
||||||
CantClientControl = Charmed | Fleeing | Confused | Possessed,
|
|
||||||
LostControl = Controlled | Possessed | Jumping | Charging,
|
LostControl = Controlled | Possessed | Jumping | Charging,
|
||||||
CannotAutoattack = Controlled | Charging | Casting,
|
CannotAutoattack = Controlled | Charging | Casting,
|
||||||
Sightless = LostControl | Evade,
|
Sightless = LostControl | Evade,
|
||||||
|
|||||||
@@ -311,7 +311,7 @@ namespace Game
|
|||||||
return eventId;
|
return eventId;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FreeInviteId(ulong id)
|
public void FreeInviteId(ulong id)
|
||||||
{
|
{
|
||||||
if (id == _maxInviteId)
|
if (id == _maxInviteId)
|
||||||
--_maxInviteId;
|
--_maxInviteId;
|
||||||
|
|||||||
@@ -7393,8 +7393,8 @@ namespace Game.Entities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Gender GetNativeGender() { return (Gender)(byte)m_playerData.NativeSex; }
|
public override Gender GetNativeGender() { return (Gender)(byte)m_playerData.NativeSex; }
|
||||||
public void SetNativeGender(Gender sex) { SetUpdateFieldValue(m_values.ModifyValue(m_playerData).ModifyValue(m_playerData.NativeSex), (byte)sex); }
|
public override void SetNativeGender(Gender sex) { SetUpdateFieldValue(m_values.ModifyValue(m_playerData).ModifyValue(m_playerData.NativeSex), (byte)sex); }
|
||||||
public void SetPvpTitle(byte pvpTitle) { SetUpdateFieldValue(m_values.ModifyValue(m_playerData).ModifyValue(m_playerData.PvpTitle), pvpTitle); }
|
public void SetPvpTitle(byte pvpTitle) { SetUpdateFieldValue(m_values.ModifyValue(m_playerData).ModifyValue(m_playerData.PvpTitle), pvpTitle); }
|
||||||
public void SetArenaFaction(byte arenaFaction) { SetUpdateFieldValue(m_values.ModifyValue(m_playerData).ModifyValue(m_playerData.ArenaFaction), arenaFaction); }
|
public void SetArenaFaction(byte arenaFaction) { SetUpdateFieldValue(m_values.ModifyValue(m_playerData).ModifyValue(m_playerData.ArenaFaction), arenaFaction); }
|
||||||
public void ApplyModFakeInebriation(int mod, bool apply) { ApplyModUpdateFieldValue(m_values.ModifyValue(m_playerData).ModifyValue(m_playerData.FakeInebriation), mod, apply); }
|
public void ApplyModFakeInebriation(int mod, bool apply) { ApplyModUpdateFieldValue(m_values.ModifyValue(m_playerData).ModifyValue(m_playerData.FakeInebriation), mod, apply); }
|
||||||
|
|||||||
@@ -921,17 +921,10 @@ namespace Game.Entities
|
|||||||
|
|
||||||
if (vehicle.GetBase().IsCreature())
|
if (vehicle.GetBase().IsCreature())
|
||||||
{
|
{
|
||||||
// If a player entered a vehicle that is part of a formation, remove it from said formation and replace current movement generator with MoveIdle (no movement)
|
// If a player entered a vehicle that is part of a formation, remove it from said formation
|
||||||
CreatureGroup creatureGroup = vehicle.GetBase().ToCreature().GetFormation();
|
CreatureGroup creatureGroup = vehicle.GetBase().ToCreature().GetFormation();
|
||||||
if (creatureGroup != null)
|
if (creatureGroup != null)
|
||||||
{
|
|
||||||
creatureGroup.RemoveMember(vehicle.GetBase().ToCreature());
|
creatureGroup.RemoveMember(vehicle.GetBase().ToCreature());
|
||||||
vehicle.GetBase().GetMotionMaster().MoveIdle();
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the vehicle has the random movement generator active, replace it with MoveIdle (no movement) so it won't override player control
|
|
||||||
if (vehicle.GetBase().GetMotionMaster().GetCurrentMovementGeneratorType() == MovementGeneratorType.Random)
|
|
||||||
vehicle.GetBase().GetMotionMaster().MoveIdle();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1040,14 +1033,8 @@ namespace Game.Entities
|
|||||||
GetMotionMaster().LaunchMoveSpline(init, EventId.VehicleExit, MovementGeneratorPriority.Highest);
|
GetMotionMaster().LaunchMoveSpline(init, EventId.VehicleExit, MovementGeneratorPriority.Highest);
|
||||||
|
|
||||||
if (player != null)
|
if (player != null)
|
||||||
{
|
|
||||||
player.ResummonPetTemporaryUnSummonedIfAny();
|
player.ResummonPetTemporaryUnSummonedIfAny();
|
||||||
|
|
||||||
// When a player exits a creature vehicle, restore its default motion generator (if any)
|
|
||||||
if (vehicle.GetBase().IsCreature())
|
|
||||||
vehicle.GetBase().GetMotionMaster().InitializeDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (vehicle.GetBase().HasUnitTypeMask(UnitTypeMask.Minion) && vehicle.GetBase().IsTypeId(TypeId.Unit))
|
if (vehicle.GetBase().HasUnitTypeMask(UnitTypeMask.Minion) && vehicle.GetBase().IsTypeId(TypeId.Unit))
|
||||||
if (((Minion)vehicle.GetBase()).GetOwner() == this)
|
if (((Minion)vehicle.GetBase()).GetOwner() == this)
|
||||||
vehicle.GetBase().ToCreature().DespawnOrUnsummon(vehicle.GetDespawnDelay());
|
vehicle.GetBase().ToCreature().DespawnOrUnsummon(vehicle.GetDespawnDelay());
|
||||||
|
|||||||
@@ -639,34 +639,7 @@ namespace Game.Maps
|
|||||||
{
|
{
|
||||||
var playerList = instance.GetPlayers();
|
var playerList = instance.GetPlayers();
|
||||||
foreach (var player in playerList)
|
foreach (var player in playerList)
|
||||||
{
|
DoRemoveAurasDueToSpellOnPlayer(player, spell, includePets, includeControlled);
|
||||||
player.RemoveAurasDueToSpell(spell);
|
|
||||||
|
|
||||||
if (!includePets)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
for (byte i = 0; i < SharedConst.MaxSummonSlot; ++i)
|
|
||||||
{
|
|
||||||
ObjectGuid summonGUID = player.m_SummonSlot[i];
|
|
||||||
if (!summonGUID.IsEmpty())
|
|
||||||
{
|
|
||||||
Creature summon = instance.GetCreature(summonGUID);
|
|
||||||
if (summon != null)
|
|
||||||
summon.RemoveAurasDueToSpell(spell);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!includeControlled)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
for (var i = 0; i < player.m_Controlled.Count; ++i)
|
|
||||||
{
|
|
||||||
Unit controlled = player.m_Controlled[i];
|
|
||||||
if (controlled != null)
|
|
||||||
if (controlled.IsInWorld && controlled.IsCreature())
|
|
||||||
controlled.RemoveAurasDueToSpell(spell);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DoRemoveAurasDueToSpellOnPlayer(Player player, uint spell, bool includePets = false, bool includeControlled = false)
|
public void DoRemoveAurasDueToSpellOnPlayer(Player player, uint spell, bool includePets = false, bool includeControlled = false)
|
||||||
@@ -707,34 +680,7 @@ namespace Game.Maps
|
|||||||
{
|
{
|
||||||
var playerList = instance.GetPlayers();
|
var playerList = instance.GetPlayers();
|
||||||
foreach (var player in playerList)
|
foreach (var player in playerList)
|
||||||
{
|
DoCastSpellOnPlayer(player, spell, includePets, includeControlled);
|
||||||
player.CastSpell(player, spell, true);
|
|
||||||
|
|
||||||
if (!includePets)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
for (var i = 0; i < SharedConst.MaxSummonSlot; ++i)
|
|
||||||
{
|
|
||||||
ObjectGuid summonGUID = player.m_SummonSlot[i];
|
|
||||||
if (!summonGUID.IsEmpty())
|
|
||||||
{
|
|
||||||
Creature summon = instance.GetCreature(summonGUID);
|
|
||||||
if (summon != null)
|
|
||||||
summon.CastSpell(player, spell, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!includeControlled)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
for (var i = 0; i < player.m_Controlled.Count; ++i)
|
|
||||||
{
|
|
||||||
Unit controlled = player.m_Controlled[i];
|
|
||||||
if (controlled != null)
|
|
||||||
if (controlled.IsInWorld && controlled.IsCreature())
|
|
||||||
controlled.CastSpell(player, spell, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DoCastSpellOnPlayer(Player player, uint spell, bool includePets = false, bool includeControlled = false)
|
public void DoCastSpellOnPlayer(Player player, uint spell, bool includePets = false, bool includeControlled = false)
|
||||||
|
|||||||
@@ -3543,6 +3543,7 @@ namespace Game.Entities
|
|||||||
});
|
});
|
||||||
|
|
||||||
ApplySpellFix(new[] {
|
ApplySpellFix(new[] {
|
||||||
|
15538, // Gout of Flame
|
||||||
42490, // Energized!
|
42490, // Energized!
|
||||||
42492, // Cast Energized
|
42492, // Cast Energized
|
||||||
43115 // Plague Vial
|
43115 // Plague Vial
|
||||||
@@ -3656,6 +3657,12 @@ namespace Game.Entities
|
|||||||
spellInfo.RecoveryTime = 20000;
|
spellInfo.RecoveryTime = 20000;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Summon Frigid Bones
|
||||||
|
ApplySpellFix(new[] { 53525 }, spellInfo =>
|
||||||
|
{
|
||||||
|
spellInfo.DurationEntry = CliDB.SpellDurationStorage.LookupByKey(4); // 2 minutes
|
||||||
|
});
|
||||||
|
|
||||||
//
|
//
|
||||||
// VIOLET HOLD SPELLS
|
// VIOLET HOLD SPELLS
|
||||||
//
|
//
|
||||||
@@ -4260,6 +4267,13 @@ namespace Game.Entities
|
|||||||
spellInfo.AttributesEx3 |= SpellAttr3.NoInitialAggro;
|
spellInfo.AttributesEx3 |= SpellAttr3.NoInitialAggro;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Spore - Spore Visual
|
||||||
|
ApplySpellFix(new[] { 42525 }, spellInfo =>
|
||||||
|
{
|
||||||
|
spellInfo.AttributesEx3 |= SpellAttr3.DeathPersistent;
|
||||||
|
spellInfo.AttributesEx2 |= SpellAttr2.CanTargetDead;
|
||||||
|
});
|
||||||
|
|
||||||
//
|
//
|
||||||
// FIRELANDS SPELLS
|
// FIRELANDS SPELLS
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user