Misc fixes
This commit is contained in:
@@ -2021,7 +2021,7 @@ namespace Game.AI
|
|||||||
|
|
||||||
if (e.Action.activateGameObject.gameObjectAction >= (uint)GameObjectActions.Max)
|
if (e.Action.activateGameObject.gameObjectAction >= (uint)GameObjectActions.Max)
|
||||||
{
|
{
|
||||||
Log.outError(LogFilter.Sql, $"SmartAIMgr: {e} has gameObjectAction parameter out of range (max allowed {(uint)GameObjectActions.Max}, current value {e.Action.activateGameObject.gameObjectAction}), skipped.");
|
Log.outError(LogFilter.Sql, $"SmartAIMgr: {e} has gameObjectAction parameter out of range (max allowed {(uint)GameObjectActions.Max - 1}, current value {e.Action.activateGameObject.gameObjectAction}), skipped.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1148,8 +1148,8 @@ namespace Game.BattleGrounds.Zones
|
|||||||
public const uint AllianceLostBloodElfTower = 17831;
|
public const uint AllianceLostBloodElfTower = 17831;
|
||||||
public const uint HordeLostBloodElfTower = 17832;
|
public const uint HordeLostBloodElfTower = 17832;
|
||||||
|
|
||||||
public const uint AllianceTakenDraeneiRuins = 17826;
|
public const uint AllianceTakenDraeneiRuins = 17827;
|
||||||
public const uint HordeTakenDraeneiRuins = 17827;
|
public const uint HordeTakenDraeneiRuins = 17826;
|
||||||
public const uint AllianceLostDraeneiRuins = 17833;
|
public const uint AllianceLostDraeneiRuins = 17833;
|
||||||
public const uint HordeLostDraeneiRuins = 17834;
|
public const uint HordeLostDraeneiRuins = 17834;
|
||||||
|
|
||||||
|
|||||||
@@ -111,8 +111,6 @@ namespace Game.Chat
|
|||||||
if (!playerTarget)
|
if (!playerTarget)
|
||||||
playerTarget = player;
|
playerTarget = player;
|
||||||
|
|
||||||
Log.outDebug(LogFilter.Server, Global.ObjectMgr.GetCypherString(CypherStrings.Additem), itemId, count);
|
|
||||||
|
|
||||||
ItemTemplate itemTemplate = Global.ObjectMgr.GetItemTemplate(itemId);
|
ItemTemplate itemTemplate = Global.ObjectMgr.GetItemTemplate(itemId);
|
||||||
if (itemTemplate == null)
|
if (itemTemplate == null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1444,6 +1444,19 @@ namespace Scripts.Spells.Generic
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class spell_gen_despawn_aura : AuraScript
|
||||||
|
{
|
||||||
|
void OnRemove(AuraEffect aurEff, AuraEffectHandleModes mode)
|
||||||
|
{
|
||||||
|
GetTarget().ToCreature()?.DespawnOrUnsummon();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Register()
|
||||||
|
{
|
||||||
|
AfterEffectRemove.Add(new EffectApplyHandler(OnRemove, SpellConst.EffectFirstFound, AuraType.Dummy, AuraEffectHandleModes.Real));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Script]
|
[Script]
|
||||||
class spell_gen_despawn_self : SpellScript
|
class spell_gen_despawn_self : SpellScript
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -203,13 +203,6 @@ namespace Scripts.Spells.Quest
|
|||||||
//Escapefromsilverbrook
|
//Escapefromsilverbrook
|
||||||
public const uint SummonWorgen = 48681;
|
public const uint SummonWorgen = 48681;
|
||||||
|
|
||||||
//BasicOrdersEmote
|
|
||||||
public const uint TestSalute = 73835;
|
|
||||||
public const uint TestRoar = 73836;
|
|
||||||
public const uint TestCheer = 73725;
|
|
||||||
public const uint TestDance = 73837;
|
|
||||||
public const uint TestStopDance = 73886;
|
|
||||||
|
|
||||||
//Deathcomesfromonhigh
|
//Deathcomesfromonhigh
|
||||||
public const uint ForgeCredit = 51974;
|
public const uint ForgeCredit = 51974;
|
||||||
public const uint TownHallCredit = 51977;
|
public const uint TownHallCredit = 51977;
|
||||||
@@ -1820,49 +1813,6 @@ namespace Scripts.Spells.Quest
|
|||||||
OnDestinationTargetSelect.Add(new DestinationTargetSelectHandler(ModDest, 0, Targets.DestCasterSummon));
|
OnDestinationTargetSelect.Add(new DestinationTargetSelectHandler(ModDest, 0, Targets.DestCasterSummon));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
73725 - [DND] Test Cheer
|
|
||||||
73835 - [DND] Test Salute
|
|
||||||
73836 - [DND] Test Roar
|
|
||||||
73837 - [DND] Test Dance
|
|
||||||
73886 - [DND] Test Stop Dance
|
|
||||||
*/
|
|
||||||
[Script]
|
|
||||||
class spell_q25199_emote : AuraScript
|
|
||||||
{
|
|
||||||
void HandlePeriodic(AuraEffect aurEff)
|
|
||||||
{
|
|
||||||
Unit target = GetTarget();
|
|
||||||
|
|
||||||
switch (GetSpellInfo().Id)
|
|
||||||
{
|
|
||||||
case SpellIds.TestSalute:
|
|
||||||
target.HandleEmoteCommand(Emote.OneshotSalute);
|
|
||||||
break;
|
|
||||||
case SpellIds.TestRoar:
|
|
||||||
target.HandleEmoteCommand(Emote.OneshotRoar);
|
|
||||||
break;
|
|
||||||
case SpellIds.TestCheer:
|
|
||||||
target.HandleEmoteCommand(Emote.OneshotCheer);
|
|
||||||
break;
|
|
||||||
case SpellIds.TestDance:
|
|
||||||
target.SetEmoteState(Emote.StateDance);
|
|
||||||
break;
|
|
||||||
case SpellIds.TestStopDance:
|
|
||||||
target.SetEmoteState(Emote.StateNone);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
Remove();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Register()
|
|
||||||
{
|
|
||||||
OnEffectPeriodic.Add(new EffectPeriodicHandler(HandlePeriodic, 0, AuraType.PeriodicDummy));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Script] // 51858 - Siphon of Acherus
|
[Script] // 51858 - Siphon of Acherus
|
||||||
class spell_q12641_death_comes_from_on_high : SpellScript
|
class spell_q12641_death_comes_from_on_high : SpellScript
|
||||||
|
|||||||
@@ -594,34 +594,6 @@ namespace Scripts.World.GameObjects
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Script]
|
|
||||||
class go_toy_train_set : GameObjectAI
|
|
||||||
{
|
|
||||||
uint _pulseTimer;
|
|
||||||
|
|
||||||
public go_toy_train_set(GameObject go) : base(go)
|
|
||||||
{
|
|
||||||
_pulseTimer = 3 * Time.InMilliseconds;
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void UpdateAI(uint diff)
|
|
||||||
{
|
|
||||||
if (diff < _pulseTimer)
|
|
||||||
_pulseTimer -= diff;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
me.CastSpell(null, SpellIds.ToyTrainPulse, true);
|
|
||||||
_pulseTimer = 6 * Time.InMilliseconds;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// triggered on wrecker'd
|
|
||||||
public override void DoAction(int action)
|
|
||||||
{
|
|
||||||
me.Delete();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Script]
|
[Script]
|
||||||
class go_brewfest_music : GameObjectAI
|
class go_brewfest_music : GameObjectAI
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user