mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 10:56:38 +01:00
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/Handlers/ChatHandler.cpp
This commit is contained in:
@@ -95,7 +95,8 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32 accountId = AccountMgr::GetId(target);
|
||||
uint64 targetGuid = sObjectMgr->GetPlayerGUIDByName(target);
|
||||
uint32 accountId = sObjectMgr->GetPlayerAccountIdByGUID(targetGuid);
|
||||
// Target must exist and have administrative rights
|
||||
if (!AccountMgr::HasPermission(accountId, RBAC_PERM_COMMANDS_BE_ASSIGNED_TICKET, realmID))
|
||||
{
|
||||
@@ -103,8 +104,6 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
uint64 targetGuid = sObjectMgr->GetPlayerGUIDByName(target);
|
||||
|
||||
// If already assigned, leave
|
||||
if (ticket->IsAssignedTo(targetGuid))
|
||||
{
|
||||
|
||||
@@ -19,13 +19,10 @@
|
||||
SDName: Boss Malygos
|
||||
Script Data End */
|
||||
|
||||
/* Main problems needing most attention:
|
||||
1) Add support for using Exit Portal while on drake which means to
|
||||
find seat flag that allows casting on passenger or something that
|
||||
will prevent valid target filtering.
|
||||
2) Find what cause client not sending release now availability
|
||||
if player dies after far falling. For now player needs to logout to get body after
|
||||
if release button remain unavailable after box popping.*/
|
||||
/* Main problem needing most attention:
|
||||
Add support for using Exit Portal while on drake which means to
|
||||
find seat flag that allows casting on passenger or something that
|
||||
will prevent valid target filtering. */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
@@ -359,8 +356,8 @@ public:
|
||||
|
||||
_summonDeaths = 0;
|
||||
_preparingPulsesChecker = 0;
|
||||
_arcaneOverloadGUID = NULL;
|
||||
_lastHitByArcaneBarrageGUID = NULL;
|
||||
_arcaneOverloadGUID = 0;
|
||||
_lastHitByArcaneBarrageGUID = 0;
|
||||
memset(_surgeTargetGUID, 0, sizeof(_surgeTargetGUID));
|
||||
|
||||
_killSpamFilter = false;
|
||||
@@ -2054,7 +2051,7 @@ class spell_scion_of_eternity_arcane_barrage : public SpellScriptLoader
|
||||
// in longer terms this means if spell picks target X then 2nd cast of this spell will pick smth else
|
||||
// and if 3rd picks X again 4th will pick smth else (by not limiting the cast to certain caster).
|
||||
if (targets.size() > 1)
|
||||
if (malygos && malygos->AI()->GetGUID(DATA_LAST_TARGET_BARRAGE_GUID) != NULL)
|
||||
if (malygos && malygos->AI()->GetGUID(DATA_LAST_TARGET_BARRAGE_GUID))
|
||||
targets.remove_if(Trinity::ObjectGUIDCheck(malygos->AI()->GetGUID(DATA_LAST_TARGET_BARRAGE_GUID)));
|
||||
|
||||
// Remove players not on Hover Disk from second list
|
||||
|
||||
@@ -152,6 +152,20 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void OnUnitDeath(Unit* unit)
|
||||
{
|
||||
if (unit->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
// For some reason player continues sometimes to be moving after death on this map,
|
||||
// perhaps only client side issue am not entirtly sure.
|
||||
// This fix not being able to press release button.
|
||||
// Variation of this with some check needs to be implemented somewhere within core code.
|
||||
// It'll stay here until someone find where and why the leak happens.
|
||||
if (Player* dyingPlayer = unit->ToPlayer())
|
||||
dyingPlayer->StopMoving();
|
||||
}
|
||||
|
||||
void ProcessEvent(WorldObject* /*obj*/, uint32 eventId)
|
||||
{
|
||||
if (eventId == EVENT_FOCUSING_IRIS)
|
||||
|
||||
@@ -32,6 +32,8 @@ EndContentData */
|
||||
#include "ScriptedGossip.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "Player.h"
|
||||
#include "TemporarySummon.h"
|
||||
#include "CombatAI.h"
|
||||
|
||||
/*######
|
||||
## npc_arete
|
||||
@@ -874,6 +876,92 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/*######
|
||||
## Borrowed Technology - Id: 13291, The Solution Solution (daily) - Id: 13292, Volatility - Id: 13239, Volatiliy - Id: 13261 (daily)
|
||||
######*/
|
||||
|
||||
enum BorrowedTechnologyAndVolatility
|
||||
{
|
||||
// Spells
|
||||
SPELL_GRAB = 59318,
|
||||
SPELL_PING_BUNNY = 59375,
|
||||
SPELL_IMMOLATION = 54690,
|
||||
SPELL_EXPLOSION = 59335,
|
||||
SPELL_RIDE = 56687,
|
||||
|
||||
// Points
|
||||
POINT_GRAB_DECOY = 1,
|
||||
POINT_FLY_AWAY = 2,
|
||||
|
||||
// Events
|
||||
EVENT_FLY_AWAY = 1
|
||||
};
|
||||
|
||||
class npc_frostbrood_skytalon : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_frostbrood_skytalon() : CreatureScript("npc_frostbrood_skytalon") { }
|
||||
|
||||
struct npc_frostbrood_skytalonAI : public VehicleAI
|
||||
{
|
||||
npc_frostbrood_skytalonAI(Creature* creature) : VehicleAI(creature) { }
|
||||
|
||||
EventMap events;
|
||||
|
||||
void IsSummonedBy(Unit* summoner)
|
||||
{
|
||||
me->GetMotionMaster()->MovePoint(POINT_GRAB_DECOY, summoner->GetPositionX(), summoner->GetPositionY(), summoner->GetPositionZ());
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 id)
|
||||
{
|
||||
if (type != POINT_MOTION_TYPE)
|
||||
return;
|
||||
|
||||
if (id == POINT_GRAB_DECOY)
|
||||
if (TempSummon* summon = me->ToTempSummon())
|
||||
if (Unit* summoner = summon->GetSummoner())
|
||||
DoCast(summoner, SPELL_GRAB);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff)
|
||||
{
|
||||
VehicleAI::UpdateAI(diff);
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
if (eventId == EVENT_FLY_AWAY)
|
||||
{
|
||||
Position randomPosOnRadius;
|
||||
randomPosOnRadius.m_positionZ = (me->GetPositionZ() + 40.0f);
|
||||
me->GetNearPoint2D(randomPosOnRadius.m_positionX, randomPosOnRadius.m_positionY, 40.0f, me->GetAngle(me));
|
||||
me->GetMotionMaster()->MovePoint(POINT_FLY_AWAY, randomPosOnRadius);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*caster*/, SpellInfo const* spell)
|
||||
{
|
||||
switch (spell->Id)
|
||||
{
|
||||
case SPELL_EXPLOSION:
|
||||
DoCast(me, SPELL_IMMOLATION);
|
||||
break;
|
||||
case SPELL_RIDE:
|
||||
DoCastAOE(SPELL_PING_BUNNY);
|
||||
events.ScheduleEvent(EVENT_FLY_AWAY, 100);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_frostbrood_skytalonAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_icecrown()
|
||||
{
|
||||
new npc_arete;
|
||||
@@ -883,4 +971,5 @@ void AddSC_icecrown()
|
||||
new npc_vereth_the_cunning;
|
||||
new npc_tournament_training_dummy;
|
||||
new npc_blessed_banner();
|
||||
new npc_frostbrood_skytalon();
|
||||
}
|
||||
|
||||
@@ -1561,6 +1561,85 @@ class spell_q12527_zuldrak_rat : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 13291 - Borrowed Technology/13292 - The Solution Solution /Daily//13239 - Volatility/13261 - Volatiliy /Daily//
|
||||
enum Quest13291_13292_13239_13261Data
|
||||
{
|
||||
// NPCs
|
||||
NPC_SKYTALON = 31583,
|
||||
NPC_DECOY = 31578,
|
||||
// Spells
|
||||
SPELL_RIDE = 56687
|
||||
};
|
||||
|
||||
class spell_q13291_q13292_q13239_q13261_frostbrood_skytalon_grab_decoy : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_q13291_q13292_q13239_q13261_frostbrood_skytalon_grab_decoy() : SpellScriptLoader("spell_q13291_q13292_q13239_q13261_frostbrood_skytalon_grab_decoy") { }
|
||||
|
||||
class spell_q13291_q13292_q13239_q13261_frostbrood_skytalon_grab_decoy_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_q13291_q13292_q13239_q13261_frostbrood_skytalon_grab_decoy_SpellScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_RIDE))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (!GetHitCreature())
|
||||
return;
|
||||
// TO DO: Being triggered is hack, but in checkcast it doesn't pass aurastate requirements.
|
||||
// Beside that the decoy won't keep it's freeze animation state when enter.
|
||||
GetHitCreature()->CastSpell(GetCaster(), SPELL_RIDE, true);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_q13291_q13292_q13239_q13261_frostbrood_skytalon_grab_decoy_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_q13291_q13292_q13239_q13261_frostbrood_skytalon_grab_decoy_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_q13291_q13292_q13239_q13261_armored_decoy_summon_skytalon : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_q13291_q13292_q13239_q13261_armored_decoy_summon_skytalon() : SpellScriptLoader("spell_q13291_q13292_q13239_q13261_armored_decoy_summon_skytalon") { }
|
||||
|
||||
class spell_q13291_q13292_q13239_q13261_armored_decoy_summon_skytalon_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_q13291_q13292_q13239_q13261_armored_decoy_summon_skytalon_SpellScript);
|
||||
|
||||
void ChangeSummonPos(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
// Adjust effect summon position
|
||||
WorldLocation summonPos = *GetExplTargetDest();
|
||||
Position offset = { 0.0f, 0.0f, 20.0f, 0.0f };
|
||||
summonPos.RelocateOffset(offset);
|
||||
SetExplTargetDest(summonPos);
|
||||
GetHitDest()->RelocateOffset(offset);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectHit += SpellEffectFn(spell_q13291_q13292_q13239_q13261_armored_decoy_summon_skytalon_SpellScript::ChangeSummonPos, EFFECT_0, SPELL_EFFECT_SUMMON);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_q13291_q13292_q13239_q13261_armored_decoy_summon_skytalon_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_quest_spell_scripts()
|
||||
{
|
||||
new spell_q55_sacred_cleansing();
|
||||
@@ -1599,4 +1678,6 @@ void AddSC_quest_spell_scripts()
|
||||
new spell_q11010_q11102_q11023_q11008_check_fly_mount();
|
||||
new spell_q12372_azure_on_death_force_whisper();
|
||||
new spell_q12527_zuldrak_rat();
|
||||
new spell_q13291_q13292_q13239_q13261_frostbrood_skytalon_grab_decoy();
|
||||
new spell_q13291_q13292_q13239_q13261_armored_decoy_summon_skytalon();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user