Some refactoring of code. and some cleanups

This commit is contained in:
hondacrx
2019-09-21 12:11:16 -04:00
parent 7c405230cc
commit 35c06c09fd
214 changed files with 1235 additions and 1341 deletions
+3 -3
View File
@@ -2067,8 +2067,8 @@ namespace Scripts.Spells.Generic
if (newPet.LoadPetFromDB(player, 0, player.GetLastPetNumber(), true))
{
// revive the pet if it is dead
if (newPet.getDeathState() == DeathState.Dead)
newPet.setDeathState(DeathState.Alive);
if (newPet.GetDeathState() == DeathState.Dead)
newPet.SetDeathState(DeathState.Alive);
newPet.SetFullHealth();
newPet.SetFullPower(newPet.GetPowerType());
@@ -2897,7 +2897,7 @@ namespace Scripts.Spells.Generic
if (player)
{
// Reset player faction + allow combat + allow duels
player.setFactionForRace(player.GetRace());
player.SetFactionForRace(player.GetRace());
player.RemoveUnitFlag(UnitFlags.NonAttackable);
// save player
player.SaveToDB();