Core/Refactor: Part 3

This commit is contained in:
hondacrx
2018-05-16 19:57:48 -04:00
parent 225a5d27f7
commit 5dacd669b5
112 changed files with 564 additions and 561 deletions
@@ -318,7 +318,7 @@ namespace Scripts.EasternKingdoms.Karazhan
switch (m_uiOperaEvent)
{
/// @todo Set Object visibilities for Opera based on performance
// @todo Set Object visibilities for Opera based on performance
case OperaEvents.Oz:
break;
+2 -2
View File
@@ -134,7 +134,7 @@ namespace Scripts.Kalimdor.ZoneAshenvale
if (quest.Id == QuestIds.FreedomToRuul)
{
me.SetFaction(Misc.FactionQuest);
base.Start(true, false, player.GetGUID());
Start(true, false, player.GetGUID());
}
}
@@ -224,7 +224,7 @@ namespace Scripts.Kalimdor.ZoneAshenvale
{
Talk(TextIds.SayMugStart1);
me.SetFaction(Misc.FactionQuest);
base.Start(true, false, player.GetGUID());
Start(true, false, player.GetGUID());
}
}
@@ -86,7 +86,7 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.ElderNadox
_scheduler.Schedule(TimeSpan.FromSeconds(10), task =>
{
/// @todo: summoned by egg
// @todo: summoned by egg
DoCast(me, SpellIds.SummonSwarmers);
if (RandomHelper.URand(1, 3) == 3) // 33% chance of dialog
Talk(TextIds.SayEggSac);
@@ -147,7 +147,7 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.ElderNadox
if (!GuardianSummoned && me.HealthBelowPct(50))
{
/// @todo: summoned by egg
// @todo: summoned by egg
Talk(TextIds.EmoteHatches, me);
DoCast(me, SpellIds.SummonSwarmGuard);
GuardianSummoned = true;
@@ -316,7 +316,7 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.PrinceTaldaram
{
DoCast(me, SpellIds.FlameSpherePeriodic, true);
/// @todo: find correct values
// @todo: find correct values
float angleOffset = 0.0f;
float distOffset = Misc.DataSphereDistance;
@@ -342,7 +342,7 @@ namespace Scripts.Northrend.AzjolNerub.Ahnkahet.PrinceTaldaram
float x = me.GetPositionX() + distOffset * (float)Math.Cos(angle);
float y = me.GetPositionY() + distOffset * (float)Math.Sin(angle);
/// @todo: correct speed
// @todo: correct speed
me.GetMotionMaster().MovePoint(0, x, y, me.GetPositionZ());
break;
}
@@ -447,7 +447,7 @@ namespace Scripts.Northrend.FrozenHalls.PitOfSaron.BossKrickAndIck
case Events.Outro9:
{
Talk(TextIds.SayKrickOutro8);
/// @todo Tyrannus starts killing Krick.
// @todo Tyrannus starts killing Krick.
// there shall be some visual spell effect
Creature tyrannus = ObjectAccessor.GetCreature(me, _tyrannusGUID);
if (tyrannus)
@@ -139,7 +139,7 @@ namespace Scripts.Northrend.Nexus.EyeOfEternity
return true;
}
/// @todo this should be handled in map, maybe add a summon function in map
// @todo this should be handled in map, maybe add a summon function in map
// There is no other way afaik...
void SpawnGameObject(uint entry, Position pos)
{
@@ -220,7 +220,7 @@ namespace Scripts.Northrend.Nexus.Nexus
if (aurEff.GetBase().GetStackAmount() < 2)
return;
Unit caster = GetCaster();
/// @todo the caster should be boss but not the player
// @todo the caster should be boss but not the player
if (!caster || caster.GetAI() == null)
return;
@@ -1058,7 +1058,7 @@ namespace Scripts.Northrend.Ulduar.FlameLeviathan
{
brann.RemoveFlag(UnitFields.NpcFlags, NPCFlags.Gossip);
delorah.GetMotionMaster().MovePoint(0, brann.GetPositionX() - 4, brann.GetPositionY(), brann.GetPositionZ());
/// @todo delorah->AI()->Talk(xxxx, brann->GetGUID()); when reached at branz
// @todo delorah->AI()->Talk(xxxx, brann->GetGUID()); when reached at branz
}
}
}
@@ -1388,7 +1388,7 @@ namespace Scripts.Northrend.Ulduar.FlameLeviathan
void FilterTargets(List<WorldObject> targets)
{
targets.RemoveAll(new Predicate<WorldObject>(target =>
targets.RemoveAll(target =>
{
//! No players, only vehicles (@todo check if blizzlike)
Creature creatureTarget = target.ToCreature();
@@ -1420,7 +1420,7 @@ namespace Scripts.Northrend.Ulduar.FlameLeviathan
}
return !playerFound;
}));
});
if (targets.Empty())
{
+1 -1
View File
@@ -176,7 +176,7 @@ namespace Scripts.Northrend.Ulduar
public const uint MagneticCore = 64436;
public const uint MagneticCoreVisual = 64438;
public const uint HalfHeal = 64188;
public const uint ClearAllDebuffs = 34098; /// @Todo: Make Use Of This Spell...
public const uint ClearAllDebuffs = 34098; // @Todo: Make Use Of This Spell...
public const uint FreezeAnimStun = 63354; // Used To Prevent Mkii From Doing Stuff?..
public const uint FreezeAnim = 16245; // Idle Aura. Freezes Animation.
}
+1 -1
View File
@@ -190,7 +190,7 @@ namespace Scripts.Outlands
if (quest.Id == QUEST_ROAD_TO_FALCON_WATCH)
{
me.SetFaction(FACTION_FALCON_WATCH_QUEST);
base.Start(true, false, player.GetGUID());
Start(true, false, player.GetGUID());
}
}
+3 -3
View File
@@ -2451,7 +2451,7 @@ namespace Scripts.Spells.Generic
{
Unit owner = GetCaster().GetOwner();
if (owner)
if (owner.IsTypeId(TypeId.Player)) /// @todo this check is maybe wrong
if (owner.IsTypeId(TypeId.Player)) // @todo this check is maybe wrong
owner.ToPlayer().RemovePet(null, PetSaveMode.NotInSlot, true);
}
}
@@ -2757,7 +2757,7 @@ namespace Scripts.Spells.Generic
float factor;
ushort baseItemLevel;
/// @todo Reserach coeffs for different vehicles
// @todo Reserach coeffs for different vehicles
switch (GetId())
{
case SpellIds.GearScaling:
@@ -2772,7 +2772,7 @@ namespace Scripts.Spells.Generic
float avgILvl = caster.ToPlayer().GetAverageItemLevel();
if (avgILvl < baseItemLevel)
return; /// @todo Research possibility of scaling down
return; // @todo Research possibility of scaling down
amount = (int)((avgILvl - baseItemLevel) * factor);
}
+1 -1
View File
@@ -433,7 +433,7 @@ namespace Scripts.Spells.Hunter
{
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(p.Key);
///! If spellId in cooldown map isn't valid, the above will return a null pointer.
//! If spellId in cooldown map isn't valid, the above will return a null pointer.
if (spellInfo.SpellFamilyName == SpellFamilyNames.Hunter &&
spellInfo.Id != SpellIds.Readiness &&
spellInfo.Id != SpellIds.BestialWrath &&
+8 -8
View File
@@ -255,14 +255,14 @@ namespace Scripts.Spells.Priest
void FilterTargets(List<WorldObject> targets)
{
targets.RemoveAll(new Predicate<WorldObject>(obj =>
targets.RemoveAll(obj =>
{
Unit target = obj.ToUnit();
if (target)
return !GetCaster().IsInRaidWith(target);
return true;
}));
});
uint maxTargets = (uint)(GetCaster().HasAura(SpellIds.GlyphOfCircleOfHealing) ? 6 : 5); // Glyph of Circle of Healing
@@ -368,14 +368,14 @@ namespace Scripts.Spells.Priest
{
void FilterTargets(List<WorldObject> targets)
{
targets.RemoveAll(new Predicate<WorldObject>(obj =>
targets.RemoveAll(obj =>
{
Unit target = obj.ToUnit();
if (target)
return !GetCaster().IsInRaidWith(target);
return true;
}));
});
uint maxTargets = 3;
@@ -492,23 +492,23 @@ namespace Scripts.Spells.Priest
{
void FilterTargets(List<WorldObject> targets)
{
targets.RemoveAll(new Predicate<WorldObject>(obj =>
targets.RemoveAll(obj =>
{
Unit target = obj.ToUnit();
if (target)
return target.GetPowerType() != PowerType.Mana;
return true;
}));
});
targets.RemoveAll(new Predicate<WorldObject>(obj =>
targets.RemoveAll(obj =>
{
Unit target = obj.ToUnit();
if (target)
return !GetCaster().IsInRaidWith(target);
return true;
}));
});
uint maxTargets = 3;
+1 -1
View File
@@ -367,7 +367,7 @@ namespace Scripts.Spells.Warrior
}
// 70844 - Item - Warrior T10 Protection 4P Bonus
[Script] /// 7.1.5
[Script] // 7.1.5
class spell_warr_item_t10_prot_4p_bonus : AuraScript
{
public override bool Validate(SpellInfo spellInfo)
+2 -2
View File
@@ -304,7 +304,7 @@ namespace Scripts.World
{
public go_tablet_of_the_seven() : base("go_tablet_of_the_seven") { }
/// @todo use gossip option ("Transcript the Tablet") instead, if Trinity adds support.
// @todo use gossip option ("Transcript the Tablet") instead, if Trinity adds support.
public override bool OnGossipHello(Player player, GameObject go)
{
if (go.GetGoType() != GameObjectTypes.QuestGiver)
@@ -799,7 +799,7 @@ namespace Scripts.World
if (!pPrisoner || !pPrisoner.IsAlive())
return true;
/// @todo prisoner should help player for a short period of time
// @todo prisoner should help player for a short period of time
player.KilledMonsterCredit(GameobjectConst.NpcCapturedValgardePrisonerProxy);
pPrisoner.DespawnOrUnsummon();
return true;