Misc fixes
This commit is contained in:
@@ -909,6 +909,7 @@ namespace Game.AI
|
|||||||
_followArrivedTimer = 1000;
|
_followArrivedTimer = 1000;
|
||||||
_followArrivedEntry = 0;
|
_followArrivedEntry = 0;
|
||||||
_followCreditType = 0;
|
_followCreditType = 0;
|
||||||
|
me.GetMotionMaster().Clear();
|
||||||
me.StopMoving();
|
me.StopMoving();
|
||||||
me.GetMotionMaster().MoveIdle();
|
me.GetMotionMaster().MoveIdle();
|
||||||
|
|
||||||
|
|||||||
@@ -3896,6 +3896,8 @@ namespace Game.Achievements
|
|||||||
{
|
{
|
||||||
if (_criteriasByAsset[(int)type].ContainsKey(asset))
|
if (_criteriasByAsset[(int)type].ContainsKey(asset))
|
||||||
return _criteriasByAsset[(int)type][asset];
|
return _criteriasByAsset[(int)type][asset];
|
||||||
|
|
||||||
|
return new List<Criteria>();
|
||||||
}
|
}
|
||||||
|
|
||||||
return _criteriasByType.LookupByKey(type);
|
return _criteriasByType.LookupByKey(type);
|
||||||
|
|||||||
@@ -2700,6 +2700,21 @@ namespace Scripts.Spells.Generic
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Script] // 36553 - PetWait
|
||||||
|
class spell_gen_pet_wait : SpellScript
|
||||||
|
{
|
||||||
|
void HandleScript(uint effIndex)
|
||||||
|
{
|
||||||
|
GetCaster().GetMotionMaster().Clear();
|
||||||
|
GetCaster().GetMotionMaster().MoveIdle();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Register()
|
||||||
|
{
|
||||||
|
OnEffectHit.Add(new EffectHandler(HandleScript, 0, SpellEffectName.ScriptEffect));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Script]
|
[Script]
|
||||||
class spell_gen_profession_research : SpellScript
|
class spell_gen_profession_research : SpellScript
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2962,33 +2962,6 @@ namespace Scripts.Spells.Items
|
|||||||
float lastZ = MapConst.InvalidHeight;
|
float lastZ = MapConst.InvalidHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Script]
|
|
||||||
class spell_item_teach_language : SpellScript
|
|
||||||
{
|
|
||||||
public override bool Load()
|
|
||||||
{
|
|
||||||
return GetCaster().GetTypeId() == TypeId.Player;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool Validate(SpellInfo spell)
|
|
||||||
{
|
|
||||||
return ValidateSpellInfo(SpellIds.LearnGnomishBinary, SpellIds.LearnGoblinBinary);
|
|
||||||
}
|
|
||||||
|
|
||||||
void HandleDummy(uint effIndex)
|
|
||||||
{
|
|
||||||
Player caster = GetCaster().ToPlayer();
|
|
||||||
|
|
||||||
if (RandomHelper.randChance(34))
|
|
||||||
caster.CastSpell(caster, caster.GetTeam() == Team.Alliance ? SpellIds.LearnGnomishBinary : SpellIds.LearnGoblinBinary, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Register()
|
|
||||||
{
|
|
||||||
OnEffectHitTarget.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Script]
|
[Script]
|
||||||
class spell_item_rocket_boots : SpellScript
|
class spell_item_rocket_boots : SpellScript
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,25 +28,13 @@ namespace Scripts.Spells.Quest
|
|||||||
{
|
{
|
||||||
struct SpellIds
|
struct SpellIds
|
||||||
{
|
{
|
||||||
//BendingShinbone
|
|
||||||
public const uint BendingShinbone1 = 8854;
|
|
||||||
public const uint BendingShinbone2 = 8855;
|
|
||||||
|
|
||||||
//Thaumaturgychannel
|
//Thaumaturgychannel
|
||||||
public const uint ThaumaturgyChannel = 21029;
|
public const uint ThaumaturgyChannel = 21029;
|
||||||
|
|
||||||
//Quest5206
|
|
||||||
public const uint CreateResonatingSkull = 17269;
|
|
||||||
public const uint CreateBoneDust = 17270;
|
|
||||||
|
|
||||||
//Quest11396-11399
|
//Quest11396-11399
|
||||||
public const uint ForceShieldArcanePurpleX3 = 43874;
|
public const uint ForceShieldArcanePurpleX3 = 43874;
|
||||||
public const uint ScourgingCrystalController = 43878;
|
public const uint ScourgingCrystalController = 43878;
|
||||||
|
|
||||||
//Quest11587
|
|
||||||
public const uint SummonArcanePrisonerMale = 45446; // Summon Arcane Prisoner - Male
|
|
||||||
public const uint SummonArcanePrisonerFemale = 45448; // Summon Arcane Prisoner - Female
|
|
||||||
|
|
||||||
//Quest11730
|
//Quest11730
|
||||||
public const uint SummonScavengebot004a8 = 46063;
|
public const uint SummonScavengebot004a8 = 46063;
|
||||||
public const uint SummonSentrybot57k = 46068;
|
public const uint SummonSentrybot57k = 46068;
|
||||||
@@ -79,10 +67,6 @@ namespace Scripts.Spells.Quest
|
|||||||
public const uint AllianceBattleStandardState = 4339;
|
public const uint AllianceBattleStandardState = 4339;
|
||||||
public const uint JumpRocketBlast = 4340;
|
public const uint JumpRocketBlast = 4340;
|
||||||
|
|
||||||
//Redsnapperverytasty
|
|
||||||
public const uint FishedUpRedSnapper = 29867;
|
|
||||||
public const uint FishedUpMurloc = 29869;
|
|
||||||
|
|
||||||
//BreakfastOfChampions
|
//BreakfastOfChampions
|
||||||
public const uint SummonDeepJormungar = 66510;
|
public const uint SummonDeepJormungar = 66510;
|
||||||
public const uint StormforgedMoleMachine = 66492;
|
public const uint StormforgedMoleMachine = 66492;
|
||||||
@@ -102,10 +86,6 @@ namespace Scripts.Spells.Quest
|
|||||||
public const uint ChooseLoc = 40056;
|
public const uint ChooseLoc = 40056;
|
||||||
public const uint AggroCheck = 40112;
|
public const uint AggroCheck = 40112;
|
||||||
|
|
||||||
//RecoverTheCargo
|
|
||||||
public const uint SummonLockbox = 42288;
|
|
||||||
public const uint SummonBurrower = 42289;
|
|
||||||
|
|
||||||
//Spellzuldrakrat
|
//Spellzuldrakrat
|
||||||
public const uint SummonGorgedLurkingBasilisk = 50928;
|
public const uint SummonGorgedLurkingBasilisk = 50928;
|
||||||
|
|
||||||
@@ -374,26 +354,6 @@ namespace Scripts.Spells.Quest
|
|||||||
bool _shouldAttack;
|
bool _shouldAttack;
|
||||||
uint _despawnTime;
|
uint _despawnTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Script] // 8856 - Bending Shinbone
|
|
||||||
class spell_q1846_bending_shinbone : SpellScript
|
|
||||||
{
|
|
||||||
void HandleScriptEffect(uint effIndex)
|
|
||||||
{
|
|
||||||
Item target = GetHitItem();
|
|
||||||
Unit caster = GetCaster();
|
|
||||||
if (!target && !caster.IsPlayer())
|
|
||||||
return;
|
|
||||||
|
|
||||||
uint spellId = RandomHelper.randChance(20) ? SpellIds.BendingShinbone1 : SpellIds.BendingShinbone2;
|
|
||||||
caster.CastSpell(caster, spellId, new CastSpellExtraArgs(GetSpell()));
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Register()
|
|
||||||
{
|
|
||||||
OnEffectHitTarget.Add(new EffectHandler(HandleScriptEffect, 0, SpellEffectName.ScriptEffect));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Script] // 9712 - Thaumaturgy Channel
|
[Script] // 9712 - Thaumaturgy Channel
|
||||||
class spell_q2203_thaumaturgy_channel : AuraScript
|
class spell_q2203_thaumaturgy_channel : AuraScript
|
||||||
@@ -417,33 +377,6 @@ namespace Scripts.Spells.Quest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// http://www.wowhead.com/quest=5206 Marauders of Darrowshire
|
|
||||||
[Script] // 17271 - Test Fetid Skull
|
|
||||||
class spell_q5206_test_fetid_skull : SpellScript
|
|
||||||
{
|
|
||||||
public override bool Load()
|
|
||||||
{
|
|
||||||
return GetCaster().IsTypeId(TypeId.Player);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override bool Validate(SpellInfo spellEntry)
|
|
||||||
{
|
|
||||||
return ValidateSpellInfo(SpellIds.CreateResonatingSkull, SpellIds.CreateBoneDust);
|
|
||||||
}
|
|
||||||
|
|
||||||
void HandleDummy(uint effIndex)
|
|
||||||
{
|
|
||||||
Unit caster = GetCaster();
|
|
||||||
uint spellId = RandomHelper.randChance(50) ? SpellIds.CreateResonatingSkull : SpellIds.CreateBoneDust;
|
|
||||||
caster.CastSpell(caster, spellId, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Register()
|
|
||||||
{
|
|
||||||
OnEffectHit.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// http://www.wowhead.com/quest=6124 Curing the Sick (A)
|
// http://www.wowhead.com/quest=6124 Curing the Sick (A)
|
||||||
// http://www.wowhead.com/quest=6129 Curing the Sick (H)
|
// http://www.wowhead.com/quest=6129 Curing the Sick (H)
|
||||||
[Script] // 19512 Apply Salve
|
[Script] // 19512 Apply Salve
|
||||||
@@ -559,30 +492,6 @@ namespace Scripts.Spells.Quest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// http://www.wowhead.com/quest=11587 Prison Break
|
|
||||||
[Script] // 45449 Arcane Prisoner Rescue
|
|
||||||
class spell_q11587_arcane_prisoner_rescue : SpellScript
|
|
||||||
{
|
|
||||||
public override bool Validate(SpellInfo spellEntry)
|
|
||||||
{
|
|
||||||
return ValidateSpellInfo(SpellIds.SummonArcanePrisonerMale, SpellIds.SummonArcanePrisonerFemale);
|
|
||||||
}
|
|
||||||
|
|
||||||
void HandleDummy(uint effIndex)
|
|
||||||
{
|
|
||||||
Unit caster = GetCaster();
|
|
||||||
uint spellId = SpellIds.SummonArcanePrisonerMale;
|
|
||||||
if ((RandomHelper.Rand32() % 2) != 0)
|
|
||||||
spellId = SpellIds.SummonArcanePrisonerFemale;
|
|
||||||
caster.CastSpell(caster, spellId, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Register()
|
|
||||||
{
|
|
||||||
OnEffectHitTarget.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// http://www.wowhead.com/quest=11730 Master and Servant
|
// http://www.wowhead.com/quest=11730 Master and Servant
|
||||||
[Script] // 46023 The Ultrasonic Screwdriver
|
[Script] // 46023 The Ultrasonic Screwdriver
|
||||||
class spell_q11730_ultrasonic_screwdriver : SpellScript
|
class spell_q11730_ultrasonic_screwdriver : SpellScript
|
||||||
@@ -853,30 +762,6 @@ namespace Scripts.Spells.Quest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Script] // 29866 - Cast Fishing Net
|
|
||||||
class spell_q9452_cast_net : SpellScript
|
|
||||||
{
|
|
||||||
public override bool Validate(SpellInfo spell)
|
|
||||||
{
|
|
||||||
return ValidateSpellInfo(SpellIds.FishedUpRedSnapper, SpellIds.FishedUpMurloc);
|
|
||||||
}
|
|
||||||
|
|
||||||
void HandleDummy(uint effIndex)
|
|
||||||
{
|
|
||||||
Unit caster = GetCaster();
|
|
||||||
|
|
||||||
if (RandomHelper.randChance(66))
|
|
||||||
caster.CastSpell(caster, SpellIds.FishedUpRedSnapper, true);
|
|
||||||
else
|
|
||||||
caster.CastSpell(null, SpellIds.FishedUpMurloc, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Register()
|
|
||||||
{
|
|
||||||
OnEffectHit.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Script]
|
[Script]
|
||||||
class spell_q12279_cast_net : SpellScript
|
class spell_q12279_cast_net : SpellScript
|
||||||
{
|
{
|
||||||
@@ -1065,30 +950,6 @@ namespace Scripts.Spells.Quest
|
|||||||
OnCheckCast.Add(new CheckCastHandler(CheckRequirement));
|
OnCheckCast.Add(new CheckCastHandler(CheckRequirement));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Script] // 42287 - Salvage Wreckage
|
|
||||||
class spell_q11140salvage_wreckage : SpellScript
|
|
||||||
{
|
|
||||||
public override bool Validate(SpellInfo spell)
|
|
||||||
{
|
|
||||||
return ValidateSpellInfo(SpellIds.SummonLockbox, SpellIds.SummonBurrower);
|
|
||||||
}
|
|
||||||
|
|
||||||
void HandleDummy(uint effIndex)
|
|
||||||
{
|
|
||||||
Unit caster = GetCaster();
|
|
||||||
|
|
||||||
if (RandomHelper.randChance(50))
|
|
||||||
caster.CastSpell(caster, SpellIds.SummonLockbox, true);
|
|
||||||
else
|
|
||||||
caster.CastSpell(null, SpellIds.SummonBurrower, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Register()
|
|
||||||
{
|
|
||||||
OnEffectHit.Add(new EffectHandler(HandleDummy, 0, SpellEffectName.Dummy));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Script] // 50894 - Zul'Drak Rat
|
[Script] // 50894 - Zul'Drak Rat
|
||||||
class spell_q12527_zuldrak_rat : SpellScript
|
class spell_q12527_zuldrak_rat : SpellScript
|
||||||
|
|||||||
Reference in New Issue
Block a user