Core/Refactor: Part 5

This commit is contained in:
hondacrx
2018-07-05 10:57:42 -04:00
parent badf6c2714
commit 7255455b22
24 changed files with 109 additions and 85 deletions
+1 -1
View File
@@ -4023,7 +4023,7 @@ namespace Game.Entities
if (keepDays == 0)
return;
Player.DeleteOldCharacters(keepDays);
DeleteOldCharacters(keepDays);
}
public static void DeleteOldCharacters(int keepDays)
+1 -1
View File
@@ -6276,7 +6276,7 @@ namespace Game.Entities
if (groupRules)
group.UpdateLooterGuid(go, true);
loot.FillLoot(lootid, LootManager.Gameobject, this, !groupRules, false, go.GetLootMode());
loot.FillLoot(lootid, LootStorage.Gameobject, this, !groupRules, false, go.GetLootMode());
// get next RR player (for next loot)
if (groupRules)
+2 -2
View File
@@ -1973,7 +1973,7 @@ namespace Game.Entities
PlayerSpell spell = m_spells.LookupByKey(spellId);
bool disabled = (spell != null) ? spell.Disabled : false;
bool active = disabled ? spell.Active : true;
bool active = !disabled || spell.Active;
bool learning = AddSpell(spellId, active, true, dependent, false, false, fromSkill);
@@ -2525,7 +2525,7 @@ namespace Game.Entities
// needs to be when spell is already learned, to prevent infinite recursion crashes
if (Global.DB2Mgr.GetMount(spellId) != null)
GetSession().GetCollectionMgr().AddMount(spellId, MountStatusFlags.None, false, IsInWorld ? false : true);
GetSession().GetCollectionMgr().AddMount(spellId, MountStatusFlags.None, false, !IsInWorld);
// need to add Battle pets automatically into pet journal
foreach (BattlePetSpeciesRecord entry in CliDB.BattlePetSpeciesStorage.Values)
+3
View File
@@ -5204,6 +5204,9 @@ namespace Game.Entities
}
//Target
// Used for serverside target changes, does not apply to players
public override void SetTarget(ObjectGuid guid) { }
public void SetSelection(ObjectGuid guid)
{
SetGuidValue(UnitFields.Target, guid);
+1 -1
View File
@@ -1403,7 +1403,7 @@ namespace Game.Entities
loot.clear();
uint lootid = creature.GetCreatureTemplate().LootId;
if (lootid != 0)
loot.FillLoot(lootid, LootManager.Creature, looter, false, false, creature.GetLootMode());
loot.FillLoot(lootid, LootStorage.Creature, looter, false, false, creature.GetLootMode());
loot.generateMoneyLoot(creature.GetCreatureTemplate().MinGold, creature.GetCreatureTemplate().MaxGold);