Entities/Player: Properly restore PvP-enabled state on login
Port From (https://github.com/TrinityCore/TrinityCore/commit/a5d8807af8cb0f257f81fa5cf3ac70769b677575)
This commit is contained in:
@@ -3056,11 +3056,10 @@ namespace Game.Entities
|
||||
|
||||
// set value, including drunk invisibility detection
|
||||
// calculate sobering. after 15 minutes logged out, the player will be sober again
|
||||
byte newDrunkValue = 0;
|
||||
if (time_diff < (uint)GetDrunkValue() * 9)
|
||||
newDrunkValue = (byte)(GetDrunkValue() - time_diff / 9);
|
||||
|
||||
SetDrunkValue(newDrunkValue);
|
||||
SetDrunkValue((byte)(GetDrunkValue() - time_diff / 9));
|
||||
else
|
||||
SetDrunkValue(0);
|
||||
|
||||
m_createTime = createTime;
|
||||
m_createMode = createMode;
|
||||
@@ -3297,6 +3296,8 @@ namespace Game.Entities
|
||||
}
|
||||
}
|
||||
|
||||
InitPvP();
|
||||
|
||||
// RaF stuff.
|
||||
if (GetSession().IsARecruiter() || (GetSession().GetRecruiterId() != 0))
|
||||
AddDynamicFlag(UnitDynFlags.ReferAFriend);
|
||||
|
||||
Reference in New Issue
Block a user