Merge remote-tracking branch 'origin/master' into 4.3.4
Conflicts: src/server/game/Entities/Unit/Unit.cpp
This commit is contained in:
commit
e3add09fb7
14 files changed
+98
-62
No files matched your search
@@ -0,0 +1,4 @@
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=10 AND `SourceGroup`=34379;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(10,34379,50452,0,0,19,0,8,0,0,0,0,'', 'Wodin''s Lucky Necklace only 25 heroic'),
|
||||
(10,34379,50453,0,0,19,0,8,0,0,0,0,'', 'Ring of Rotting Sinew only 25 heroic');
|
||||
@@ -0,0 +1 @@
|
||||
UPDATE `creature_loot_template` SET `item`=39657 WHERE `entry`=28546 AND `item`=36657;
|
||||
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `creature_template_addon` WHERE `entry`=28670; -- Frostbrood Vanquisher
|
||||
INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
|
||||
(28670,0,0,0x3000000,0x1,0,'53112');
|
||||
@@ -0,0 +1,26 @@
|
||||
-- Add support for quest ID: 11008 - "Fires Over Skettis" Warpten fix and Nelegalno/shlomi1515 updates
|
||||
-- Also add support for achievement - http://www.wowhead.com/achievement=1275/bombs-away
|
||||
-- Fix previous SQL what is not changed is not included
|
||||
SET @TRIGGER := 22991;
|
||||
SET @EGG := 185549;
|
||||
SET @SKYBLAST := 39844;
|
||||
SET @SUMMEGG := 39843;
|
||||
-- Adds SAI support for Monstrous Kaliri Egg Trigger and the GO
|
||||
UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@TRIGGER;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@TRIGGER AND `source_type`=0;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@TRIGGER*100 AND `source_type`=9;
|
||||
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
|
||||
(@TRIGGER,0,0,0,25,0,100,0,0,0,0,0,11,@SUMMEGG,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - On spawn/reset - Summon Monstrous Kaliri Egg (object wild)'),
|
||||
(@TRIGGER,0,1,2,8,0,100,0,@SKYBLAST,0,0,0,33,@TRIGGER,0,0,0,0,0,16,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - On Skyguard Blasting Charge hit - Give kill credit to invoker party'),
|
||||
(@TRIGGER,0,2,0,61,0,100,0,0,0,0,0,80,@TRIGGER*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger - Linked with previous event - Start script 0'),
|
||||
(@TRIGGER*100,9,0,0,0,0,100,0,44000,44000,0,0,11,@SUMMEGG,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Monstrous Kaliri Egg Trigger /On actionlist/ - Action 0 - Cast Summon Monstrous Kaliri Egg');
|
||||
-- Add conditions (thanks to Vincent-Michael for adding and Shauren for noticing my failure miss)
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@SKYBLAST;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(13,1,@SKYBLAST,0,0,31,0,3,22991,0,0,0,'','Skyguard Blasting Charge can hit only Monstrous Kaliri Egg Trigger'),
|
||||
(13,2,@SKYBLAST,0,0,31,0,5,185549,0,0,0,'','Skyguard Blasting can hit only Monstrous Kaliri Egg');
|
||||
-- Remove SAI for Cannonball Stack
|
||||
UPDATE `gameobject_template` SET `AIName`='' WHERE `entry`=@EGG;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=@EGG AND `source_type`=1;
|
||||
-- Delete GO spawns that are not needed
|
||||
DELETE FROM `gameobject` WHERE `id`=@EGG;
|
||||
@@ -0,0 +1,3 @@
|
||||
DELETE FROM spell_script_names WHERE scriptName="spell_dru_savage_roar";
|
||||
INSERT INTO spell_script_names (spell_id, ScriptName) VALUES
|
||||
(52610, 'spell_dru_savage_roar');
|
||||
@@ -279,16 +279,9 @@ bool Condition::Meets(ConditionSourceInfo& sourceInfo)
|
||||
condMeets = player->HasTitle(ConditionValue1);
|
||||
break;
|
||||
}
|
||||
case CONDITION_MAP_DIFFICULTY:
|
||||
case CONDITION_SPAWNMASK:
|
||||
{
|
||||
if (Unit* unit = object->ToUnit())
|
||||
{
|
||||
if (unit->GetMap()->IsRaid())
|
||||
if (unit->GetMap()->Is25ManRaid() != ((ConditionValue1 & RAID_DIFFICULTY_MASK_25MAN) != 0))
|
||||
return false;
|
||||
|
||||
condMeets = unit->GetMap()->GetSpawnMode() >= ConditionValue1;
|
||||
}
|
||||
condMeets = ((1 << object->GetMap()->GetSpawnMode()) & ConditionValue1);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -442,7 +435,7 @@ uint32 Condition::GetSearcherTypeMaskForCondition()
|
||||
case CONDITION_TITLE:
|
||||
mask |= GRID_MAP_TYPE_MASK_PLAYER;
|
||||
break;
|
||||
case CONDITION_MAP_DIFFICULTY:
|
||||
case CONDITION_SPAWNMASK:
|
||||
mask |= GRID_MAP_TYPE_MASK_ALL;
|
||||
break;
|
||||
default:
|
||||
@@ -1857,11 +1850,11 @@ bool ConditionMgr::isConditionTypeValid(Condition* cond)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CONDITION_MAP_DIFFICULTY:
|
||||
case CONDITION_SPAWNMASK:
|
||||
{
|
||||
if (cond->ConditionValue1 >= MAX_DIFFICULTY)
|
||||
if (cond->ConditionValue1 > SPAWNMASK_RAID_ALL)
|
||||
{
|
||||
sLog->outError(LOG_FILTER_SQL, "Map Difficulty condition has non existing map difficulty in value1 (%u), skipped", cond->ConditionValue1);
|
||||
sLog->outError(LOG_FILTER_SQL, "SpawnMask condition has non existing SpawnMask in value1 (%u), skipped", cond->ConditionValue1);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -49,7 +49,7 @@ enum ConditionTypes
|
||||
CONDITION_RACE = 16, // race 0 0 true if player's race is equal to race
|
||||
CONDITION_ACHIEVEMENT = 17, // achievement_id 0 0 true if achievement is complete
|
||||
CONDITION_TITLE = 18, // title id 0 0 true if player has title
|
||||
CONDITION_MAP_DIFFICULTY = 19, // difficulty 0 0
|
||||
CONDITION_SPAWNMASK = 19, // spawnMask 0 0 true if in spawnMask
|
||||
CONDITION_UNUSED_20 = 20, //
|
||||
CONDITION_UNUSED_21 = 21, //
|
||||
CONDITION_MAPID = 22, // map_id 0 0 true if in map_id
|
||||
|
||||
@@ -266,7 +266,6 @@ Unit::Unit(bool isWorldObject): WorldObject(isWorldObject)
|
||||
m_serverSideVisibility.SetValue(SERVERSIDE_VISIBILITY_GHOST, GHOST_VISIBILITY_ALIVE);
|
||||
|
||||
_focusSpell = NULL;
|
||||
_targetLocked = false;
|
||||
_lastLiquid = NULL;
|
||||
_isWalkingBeforeCharm = false;
|
||||
}
|
||||
@@ -432,6 +431,9 @@ void Unit::UpdateSplinePosition()
|
||||
transport->CalculatePassengerPosition(loc.x, loc.y, loc.z, loc.orientation);
|
||||
}
|
||||
|
||||
if (HasUnitState(UNIT_STATE_CANNOT_TURN))
|
||||
loc.orientation = GetOrientation();
|
||||
|
||||
UpdatePosition(loc.x, loc.y, loc.z, loc.orientation);
|
||||
}
|
||||
|
||||
@@ -17133,3 +17135,31 @@ bool Unit::IsSplineEnabled() const
|
||||
{
|
||||
return movespline->Initialized();
|
||||
}
|
||||
|
||||
void Unit::FocusTarget(Spell const* focusSpell, uint64 target)
|
||||
{
|
||||
// already focused
|
||||
if (_focusSpell)
|
||||
return;
|
||||
|
||||
_focusSpell = focusSpell;
|
||||
SetUInt64Value(UNIT_FIELD_TARGET, target);
|
||||
if (focusSpell->GetSpellInfo()->AttributesEx5 & SPELL_ATTR5_DONT_TURN_DURING_CAST)
|
||||
AddUnitState(UNIT_STATE_ROTATING);
|
||||
}
|
||||
|
||||
void Unit::ReleaseFocus(Spell const* focusSpell)
|
||||
{
|
||||
// focused to something else
|
||||
if (focusSpell != _focusSpell)
|
||||
return;
|
||||
|
||||
_focusSpell = NULL;
|
||||
if (Unit* victim = getVictim())
|
||||
SetUInt64Value(UNIT_FIELD_TARGET, victim->GetGUID());
|
||||
else
|
||||
SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
|
||||
if (focusSpell->GetSpellInfo()->AttributesEx5 & SPELL_ATTR5_DONT_TURN_DURING_CAST)
|
||||
ClearUnitState(UNIT_STATE_ROTATING);
|
||||
}
|
||||
@@ -2208,34 +2208,13 @@ class Unit : public WorldObject
|
||||
|
||||
void SetTarget(uint64 guid)
|
||||
{
|
||||
if (!_targetLocked)
|
||||
if (!_focusSpell)
|
||||
SetUInt64Value(UNIT_FIELD_TARGET, guid);
|
||||
}
|
||||
|
||||
void FocusTarget(Spell const* focusSpell, uint64 target)
|
||||
{
|
||||
// already focused
|
||||
if (_focusSpell)
|
||||
return;
|
||||
|
||||
_focusSpell = focusSpell;
|
||||
_targetLocked = true;
|
||||
SetUInt64Value(UNIT_FIELD_TARGET, target);
|
||||
}
|
||||
|
||||
void ReleaseFocus(Spell const* focusSpell)
|
||||
{
|
||||
// focused to something else
|
||||
if (focusSpell != _focusSpell)
|
||||
return;
|
||||
|
||||
_focusSpell = NULL;
|
||||
_targetLocked = false;
|
||||
if (Unit* victim = getVictim())
|
||||
SetUInt64Value(UNIT_FIELD_TARGET, victim->GetGUID());
|
||||
else
|
||||
SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
}
|
||||
// Handling caster facing during spellcast
|
||||
void FocusTarget(Spell const* focusSpell, uint64 target);
|
||||
void ReleaseFocus(Spell const* focusSpell);
|
||||
|
||||
// Movement info
|
||||
Movement::MoveSpline * movespline;
|
||||
@@ -2364,8 +2343,7 @@ class Unit : public WorldObject
|
||||
bool m_cleanupDone; // lock made to not add stuff after cleanup before delete
|
||||
bool m_duringRemoveFromWorld; // lock made to not add stuff after begining removing from world
|
||||
|
||||
Spell const* _focusSpell;
|
||||
bool _targetLocked; // locks the target during spell cast for proper facing
|
||||
Spell const* _focusSpell; ///> Locks the target during spell cast for proper facing
|
||||
bool _isWalkingBeforeCharm; // Are we walking before we were charmed?
|
||||
};
|
||||
|
||||
|
||||
@@ -476,7 +476,7 @@ enum SpellAttr5
|
||||
SPELL_ATTR5_SPECIAL_ITEM_CLASS_CHECK = 0x00010000, // 16 this allows spells with EquippedItemClass to affect spells from other items if the required item is equipped
|
||||
SPELL_ATTR5_USABLE_WHILE_FEARED = 0x00020000, // 17 usable while feared
|
||||
SPELL_ATTR5_USABLE_WHILE_CONFUSED = 0x00040000, // 18 usable while confused
|
||||
SPELL_ATTR5_UNK19 = 0x00080000, // 19
|
||||
SPELL_ATTR5_DONT_TURN_DURING_CAST = 0x00080000, // 19 Blocks caster's turning when casting (client does not automatically turn caster's model to face UNIT_FIELD_TARGET)
|
||||
SPELL_ATTR5_UNK20 = 0x00100000, // 20
|
||||
SPELL_ATTR5_UNK21 = 0x00200000, // 21
|
||||
SPELL_ATTR5_UNK22 = 0x00400000, // 22
|
||||
|
||||
@@ -89,6 +89,7 @@ void TargetedMovementGeneratorMedium<T,D>::_setTargetLocation(T &owner)
|
||||
|
||||
Movement::MoveSplineInit init(owner);
|
||||
init.MoveTo(x,y,z);
|
||||
init.SetFacing(i_target.getTarget());
|
||||
init.SetWalk(((D*)this)->EnableWalking());
|
||||
init.Launch();
|
||||
}
|
||||
|
||||
@@ -3049,10 +3049,9 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered
|
||||
SendSpellStart();
|
||||
|
||||
// set target for proper facing
|
||||
if (m_casttime && !(_triggeredCastFlags & TRIGGERED_IGNORE_SET_FACING))
|
||||
if (uint64 target = m_targets.GetUnitTargetGUID())
|
||||
if (m_caster->GetGUID() != target && m_caster->GetTypeId() == TYPEID_UNIT)
|
||||
m_caster->FocusTarget(this, target);
|
||||
if ((m_casttime || m_spellInfo->IsChanneled()) && !(_triggeredCastFlags & TRIGGERED_IGNORE_SET_FACING))
|
||||
if (m_caster->GetGUID() != m_targets.GetObjectTargetGUID() && m_caster->GetTypeId() == TYPEID_UNIT)
|
||||
m_caster->FocusTarget(this, m_targets.GetObjectTargetGUID());
|
||||
|
||||
if (!(_triggeredCastFlags & TRIGGERED_IGNORE_GCD))
|
||||
TriggerGlobalCooldown();
|
||||
|
||||
+7
-12
@@ -120,11 +120,8 @@ class npc_announcer_toc10 : public CreatureScript
|
||||
{
|
||||
npc_announcer_toc10AI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
@@ -274,7 +271,7 @@ class boss_lich_king_toc : public CreatureScript
|
||||
|
||||
void MovementInform(uint32 uiType, uint32 uiId)
|
||||
{
|
||||
if (uiType != POINT_MOTION_TYPE)
|
||||
if (uiType != POINT_MOTION_TYPE || !instance)
|
||||
return;
|
||||
switch (uiId)
|
||||
{
|
||||
@@ -338,20 +335,18 @@ class boss_lich_king_toc : public CreatureScript
|
||||
if (GameObject* go = instance->instance->GetGameObject(instance->GetData64(GO_ARGENT_COLISEUM_FLOOR)))
|
||||
go->SetDestructibleState(GO_DESTRUCTIBLE_DAMAGED);
|
||||
me->CastSpell(me, 69016, false);
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(TYPE_LICH_KING, DONE);
|
||||
Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_ANUBARAK));
|
||||
if (!temp || !temp->isAlive())
|
||||
temp = me->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 3, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
|
||||
instance->SetData(TYPE_LICH_KING, DONE);
|
||||
Creature* temp = Unit::GetCreature(*me, instance->GetData64(NPC_ANUBARAK));
|
||||
if (!temp || !temp->isAlive())
|
||||
temp = me->SummonCreature(NPC_ANUBARAK, AnubarakLoc[0].GetPositionX(), AnubarakLoc[0].GetPositionY(), AnubarakLoc[0].GetPositionZ(), 3, TEMPSUMMON_CORPSE_TIMED_DESPAWN, DESPAWN_TIME);
|
||||
|
||||
instance->SetData(TYPE_EVENT, 0);
|
||||
}
|
||||
instance->SetData(TYPE_EVENT, 0);
|
||||
me->DespawnOrUnsummon();
|
||||
m_uiUpdateTimer = 20000;
|
||||
break;
|
||||
}
|
||||
} else m_uiUpdateTimer -= uiDiff;
|
||||
|
||||
instance->SetData(TYPE_EVENT_TIMER, m_uiUpdateTimer);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -125,7 +125,8 @@ public:
|
||||
|
||||
void Reset()
|
||||
{
|
||||
instance->SetData(DATA_PRINCEKELESETH_EVENT, NOT_STARTED);
|
||||
if (instance)
|
||||
instance->SetData(DATA_PRINCEKELESETH_EVENT, NOT_STARTED);
|
||||
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_SHADOWBOLT, urand(2,3)*IN_MILLISECONDS);
|
||||
@@ -140,13 +141,15 @@ public:
|
||||
void EnterCombat(Unit* /*who*/)
|
||||
{
|
||||
me->SetInCombatWithZone();
|
||||
instance->SetData(DATA_PRINCEKELESETH_EVENT, IN_PROGRESS);
|
||||
if (instance)
|
||||
instance->SetData(DATA_PRINCEKELESETH_EVENT, IN_PROGRESS);
|
||||
Talk(SAY_START_COMBAT);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/)
|
||||
{
|
||||
instance->SetData(DATA_PRINCEKELESETH_EVENT, DONE);
|
||||
if (instance)
|
||||
instance->SetData(DATA_PRINCEKELESETH_EVENT, DONE);
|
||||
summons.DespawnAll();
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user