Core/Transports: Fixed stoppable elevator position calculation when going from first floor to third or higher
Port From (https://github.com/TrinityCore/TrinityCore/commit/d85379faa6d5d33f755e17cb0204f243345db938)
This commit is contained in:
@@ -305,7 +305,6 @@ namespace Framework.Constants
|
|||||||
29, 30, 31, -1, 11, 12, 13, 14
|
29, 30, 31, -1, 11, 12, 13, 14
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
public static ulong RaceMaskAllPlayable = (ulong)(GetMaskForRace(Race.Human) | GetMaskForRace(Race.Orc) | GetMaskForRace(Race.Dwarf) | GetMaskForRace(Race.NightElf) | GetMaskForRace(Race.Undead)
|
public static ulong RaceMaskAllPlayable = (ulong)(GetMaskForRace(Race.Human) | GetMaskForRace(Race.Orc) | GetMaskForRace(Race.Dwarf) | GetMaskForRace(Race.NightElf) | GetMaskForRace(Race.Undead)
|
||||||
| GetMaskForRace(Race.Tauren) | GetMaskForRace(Race.Gnome) | GetMaskForRace(Race.Troll) | GetMaskForRace(Race.BloodElf) | GetMaskForRace(Race.Draenei)
|
| GetMaskForRace(Race.Tauren) | GetMaskForRace(Race.Gnome) | GetMaskForRace(Race.Troll) | GetMaskForRace(Race.BloodElf) | GetMaskForRace(Race.Draenei)
|
||||||
| GetMaskForRace(Race.Goblin) | GetMaskForRace(Race.Worgen) | GetMaskForRace(Race.PandarenNeutral) | GetMaskForRace(Race.PandarenAlliance) | GetMaskForRace(Race.PandarenHorde)
|
| GetMaskForRace(Race.Goblin) | GetMaskForRace(Race.Worgen) | GetMaskForRace(Race.PandarenNeutral) | GetMaskForRace(Race.PandarenAlliance) | GetMaskForRace(Race.PandarenHorde)
|
||||||
|
|||||||
@@ -3823,7 +3823,12 @@ namespace Game.Entities
|
|||||||
if (oldToNewStateDelta < 0)
|
if (oldToNewStateDelta < 0)
|
||||||
oldToNewStateDelta += pauseTimesCount + 1;
|
oldToNewStateDelta += pauseTimesCount + 1;
|
||||||
|
|
||||||
if (oldToNewStateDelta < newToOldStateDelta)
|
// this additional check is neccessary because client doesn't check dynamic flags on progress update
|
||||||
|
// instead it multiplies progress from dynamicflags field by -1 and then compares that against 0
|
||||||
|
// when calculating path progress while we simply check the flag if (!_owner.HasDynamicFlag(GO_DYNFLAG_LO_INVERTED_MOVEMENT))
|
||||||
|
bool isAtStartOfPath = _stateChangeProgress == 0;
|
||||||
|
|
||||||
|
if (oldToNewStateDelta < newToOldStateDelta && !isAtStartOfPath)
|
||||||
_owner.SetDynamicFlag(GameObjectDynamicLowFlags.InvertedMovement);
|
_owner.SetDynamicFlag(GameObjectDynamicLowFlags.InvertedMovement);
|
||||||
else
|
else
|
||||||
_owner.RemoveDynamicFlag(GameObjectDynamicLowFlags.InvertedMovement);
|
_owner.RemoveDynamicFlag(GameObjectDynamicLowFlags.InvertedMovement);
|
||||||
|
|||||||
Reference in New Issue
Block a user