Core: Update to 10.1.5
Port From (https://github.com/TrinityCore/TrinityCore/commit/0cea730fa23473a85c47451c3bd13df816f2b6e4)
This commit is contained in:
@@ -768,10 +768,8 @@ namespace Game.Entities
|
||||
|
||||
pet.SetCreatorGUID(GetGUID());
|
||||
pet.SetFaction(GetFaction());
|
||||
pet.SetCreatedBySpell(spell_id);
|
||||
|
||||
if (IsTypeId(TypeId.Player))
|
||||
pet.SetUnitFlag(UnitFlags.PlayerControlled);
|
||||
pet.SetCreatedBySpell(spell_id);
|
||||
pet.SetUnitFlag(UnitFlags.PlayerControlled);
|
||||
|
||||
if (!pet.InitStatsForLevel(level))
|
||||
{
|
||||
@@ -790,6 +788,7 @@ namespace Game.Entities
|
||||
|
||||
PetStable.PetInfo petInfo = new();
|
||||
pet.FillPetInfo(petInfo);
|
||||
player.AddPetToUpdateFields(petInfo, (PetSaveMode)petStable.GetCurrentActivePetIndex(), PetStableFlags.Active);
|
||||
petStable.ActivePets[freeActiveSlot] = petInfo;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1431,7 +1431,7 @@ namespace Game.Entities
|
||||
if (displayInfo != null)
|
||||
{
|
||||
ChrCustomizationReqRecord choiceReq = CliDB.ChrCustomizationReqStorage.LookupByKey(formModelData.Choices[i].ChrCustomizationReqID);
|
||||
if (choiceReq == null || thisPlayer.GetSession().MeetsChrCustomizationReq(choiceReq, GetClass(), false, thisPlayer.m_playerData.Customizations))
|
||||
if (choiceReq == null || thisPlayer.GetSession().MeetsChrCustomizationReq(choiceReq, GetRace(), GetClass(), false, thisPlayer.m_playerData.Customizations))
|
||||
displayIds.Add(displayInfo.DisplayID);
|
||||
}
|
||||
}
|
||||
@@ -1877,6 +1877,7 @@ namespace Game.Entities
|
||||
|
||||
public Race GetRace() { return (Race)(byte)m_unitData.Race; }
|
||||
public void SetRace(Race race) { SetUpdateFieldValue(m_values.ModifyValue(m_unitData).ModifyValue(m_unitData.Race), (byte)race); }
|
||||
public ulong GetRaceMask() { return 1UL << ((int)GetRace() - 1); }
|
||||
public Class GetClass() { return (Class)(byte)m_unitData.ClassId; }
|
||||
public void SetClass(Class classId) { SetUpdateFieldValue(m_values.ModifyValue(m_unitData).ModifyValue(m_unitData.ClassId), (byte)classId); }
|
||||
public uint GetClassMask() { return (uint)(1 << ((int)GetClass() - 1)); }
|
||||
|
||||
Reference in New Issue
Block a user