Merge branch 'master' of [email protected]:TrinityCore/TrinityCore.git
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
build*/
|
build*/
|
||||||
.directory
|
.directory
|
||||||
.mailmap
|
.mailmap
|
||||||
@@ -9,3 +10,7 @@ build*/
|
|||||||
*.bak
|
*.bak
|
||||||
*.patch
|
*.patch
|
||||||
*.diff
|
*.diff
|
||||||
|
*.REMOTE.*
|
||||||
|
*.BACKUP.*
|
||||||
|
*.BASE.*
|
||||||
|
*.LOCAL.*
|
||||||
+16
-14
@@ -2,23 +2,17 @@ SET @Bag := 20469;
|
|||||||
SET @RefA := 10022;
|
SET @RefA := 10022;
|
||||||
SET @RefB := 10023;
|
SET @RefB := 10023;
|
||||||
SET @RefC := 10024;
|
SET @RefC := 10024;
|
||||||
|
SET @RefD := 10025;
|
||||||
|
|
||||||
-- Add missing recipes to "Decoded True Believer Clippings" (i20469)
|
-- Add missing recipes to "Decoded True Believer Clippings" (i20469)
|
||||||
DELETE FROM `item_loot_template` WHERE `entry` = 20469;
|
DELETE FROM `item_loot_template` WHERE `entry` = 20469;
|
||||||
INSERT INTO `item_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
|
INSERT INTO `item_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
|
||||||
-- Decoded Twilight Texts:
|
(@Bag,1,100,1,0,-@RefD,2), -- Decoded Twilight Texts
|
||||||
(@Bag,20676,Chance,1,0,1,3),
|
|
||||||
(@Bag,20541,Chance,1,0,1,3),
|
|
||||||
(@Bag,20545,Chance,1,0,1,3),
|
|
||||||
(@Bag,20679,Chance,1,0,1,3),
|
|
||||||
(@Bag,20677,Chance,1,0,1,3),
|
|
||||||
(@Bag,20678,Chance,1,0,1,3),
|
|
||||||
(@Bag,20552,Chance,1,0,1,3),
|
|
||||||
-- scrolls via reference
|
-- scrolls via reference
|
||||||
(@Bag,1,100,1,0,-10001,1), -- one from level V scrolls
|
(@Bag,2,100,1,0,-10001,1), -- one from level V scrolls
|
||||||
(@Bag,2,4,1,0,-@RefA,1), -- one from Crest of Beckoning
|
(@Bag,3,4,1,0,-@RefA,1), -- one from Crest of Beckoning
|
||||||
(@Bag,2,4,1,0,-@RefB,1), -- one from Sigil of Beckoning
|
(@Bag,4,4,1,0,-@RefB,1), -- one from Sigil of Beckoning
|
||||||
(@Bag,2,4,1,0,-@RefC,1), -- one from Scepter of Beckoning
|
(@Bag,5,4,1,0,-@RefC,1), -- one from Scepter of Beckoning
|
||||||
-- special pattern drops:
|
-- special pattern drops:
|
||||||
(@Bag,20546,3,1,0,1,1), -- Runed Stygian Leggings
|
(@Bag,20546,3,1,0,1,1), -- Runed Stygian Leggings
|
||||||
(@Bag,20547,3,1,0,1,1), -- Runed Stygian Boots
|
(@Bag,20547,3,1,0,1,1), -- Runed Stygian Boots
|
||||||
@@ -27,7 +21,7 @@ INSERT INTO `item_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode
|
|||||||
(@Bag,20554,3,1,0,1,1), -- Darkrune Breastplate
|
(@Bag,20554,3,1,0,1,1), -- Darkrune Breastplate
|
||||||
(@Bag,20555,3,1,0,1,1); -- Darkrune Helm
|
(@Bag,20555,3,1,0,1,1); -- Darkrune Helm
|
||||||
-- References:
|
-- References:
|
||||||
DELETE FROM `reference_loot_template` WHERE `entry` IN (@RefA,@RefB,@RefC);
|
DELETE FROM `reference_loot_template` WHERE `entry` IN (@RefA,@RefB,@RefC,@RefD);
|
||||||
INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
|
INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`lootmode`,`groupid`,`mincountOrRef`,`maxcount`) VALUES
|
||||||
(@RefA,20518,0,1,1,1,1), -- Scroll: Crest of Beckoning
|
(@RefA,20518,0,1,1,1,1), -- Scroll: Crest of Beckoning
|
||||||
(@RefA,20526,0,1,1,1,1), -- Scroll: Crest of Beckoning
|
(@RefA,20526,0,1,1,1,1), -- Scroll: Crest of Beckoning
|
||||||
@@ -40,4 +34,12 @@ INSERT INTO `reference_loot_template` (`entry`,`item`,`ChanceOrQuestChance`,`loo
|
|||||||
(@RefC,20540,0,1,1,1,1), -- Scroll: Scepter of Beckoning
|
(@RefC,20540,0,1,1,1,1), -- Scroll: Scepter of Beckoning
|
||||||
(@RefC,20542,0,1,1,1,1), -- Scroll: Scepter of Beckoning
|
(@RefC,20542,0,1,1,1,1), -- Scroll: Scepter of Beckoning
|
||||||
(@RefC,20543,0,1,1,1,1), -- Scroll: Scepter of Beckoning
|
(@RefC,20543,0,1,1,1,1), -- Scroll: Scepter of Beckoning
|
||||||
(@RefC,20544,0,1,1,1,1); -- Scroll: Scepter of Beckoning
|
(@RefC,20544,0,1,1,1,1), -- Scroll: Scepter of Beckoning
|
||||||
|
-- Decoded Twilight Texts:
|
||||||
|
(@RefD,20676,0,1,1,1,3),
|
||||||
|
(@RefD,20541,0,1,1,1,3),
|
||||||
|
(@RefD,20545,0,1,1,1,3),
|
||||||
|
(@RefD,20679,0,1,1,1,3),
|
||||||
|
(@RefD,20677,0,1,1,1,3),
|
||||||
|
(@RefD,20678,0,1,1,1,3),
|
||||||
|
(@RefD,20552,0,1,1,1,3);
|
||||||
@@ -0,0 +1,161 @@
|
|||||||
|
-- sp_dev_reguid procedure
|
||||||
|
/*!50003 DROP PROCEDURE IF EXISTS `sp_dev_reguid` */;
|
||||||
|
DELIMITER ;;
|
||||||
|
/*!50003 CREATE*/
|
||||||
|
/*!50003 PROCEDURE `sp_dev_reguid`()
|
||||||
|
BEGIN
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `creature_temp`;
|
||||||
|
CREATE TABLE IF NOT EXISTS `creature_temp` (
|
||||||
|
`guid` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Global Unique Identifier',
|
||||||
|
`id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Creature Identifier',
|
||||||
|
`map` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Map Identifier',
|
||||||
|
`spawnMask` tinyint(3) unsigned NOT NULL DEFAULT '1',
|
||||||
|
`phaseMask` smallint(5) unsigned NOT NULL DEFAULT '1',
|
||||||
|
`modelid` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`equipment_id` mediumint(9) NOT NULL DEFAULT '0',
|
||||||
|
`position_x` float NOT NULL DEFAULT '0',
|
||||||
|
`position_y` float NOT NULL DEFAULT '0',
|
||||||
|
`position_z` float NOT NULL DEFAULT '0',
|
||||||
|
`orientation` float NOT NULL DEFAULT '0',
|
||||||
|
`spawntimesecs` int(10) unsigned NOT NULL DEFAULT '120',
|
||||||
|
`spawndist` float NOT NULL DEFAULT '0',
|
||||||
|
`currentwaypoint` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`curhealth` int(10) unsigned NOT NULL DEFAULT '1',
|
||||||
|
`curmana` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`MovementType` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`npcflag` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`unit_flags` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`dynamicflags` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`old_guid` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
|
PRIMARY KEY (`guid`),
|
||||||
|
KEY `idx_map` (`map`),
|
||||||
|
KEY `idx_id` (`id`),
|
||||||
|
KEY `idx_oldguid_tmp` (`old_guid`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Creature System' AUTO_INCREMENT=250001;
|
||||||
|
|
||||||
|
ALTER TABLE `creature_addon` ADD COLUMN `new_guid` INT(10) UNSIGNED NOT NULL;
|
||||||
|
ALTER TABLE `creature_formations` ADD COLUMN `new_guid_leader` INT(10) UNSIGNED NOT NULL;
|
||||||
|
ALTER TABLE `creature_formations` ADD COLUMN `new_guid_member` INT(10) UNSIGNED NOT NULL;
|
||||||
|
ALTER TABLE `game_event_creature` ADD COLUMN `new_guid` INT(10) UNSIGNED NOT NULL;
|
||||||
|
ALTER TABLE `pool_creature` ADD COLUMN `new_guid` INT(10) UNSIGNED NOT NULL;
|
||||||
|
ALTER TABLE `game_event_model_equip` ADD COLUMN `new_guid` INT(10) UNSIGNED NOT NULL;
|
||||||
|
ALTER TABLE `game_event_npc_vendor` ADD COLUMN `new_guid` INT(10) UNSIGNED NOT NULL;
|
||||||
|
ALTER TABLE `game_event_npcflag` ADD COLUMN `new_guid` INT(10) UNSIGNED NOT NULL;
|
||||||
|
ALTER TABLE `smart_scripts` ADD COLUMN `new_guid` INT(10) NOT NULL;
|
||||||
|
|
||||||
|
INSERT INTO `creature_temp`
|
||||||
|
(
|
||||||
|
`id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`,
|
||||||
|
`position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`,
|
||||||
|
`currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`,
|
||||||
|
`unit_flags`, `dynamicflags`, `old_guid`
|
||||||
|
) SELECT
|
||||||
|
`id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`,
|
||||||
|
`position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`,
|
||||||
|
`currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`,
|
||||||
|
`unit_flags`, `dynamicflags`, `guid`
|
||||||
|
FROM `creature` WHERE `guid` < 250001 ORDER BY `id` ASC;
|
||||||
|
|
||||||
|
INSERT INTO `creature_temp`
|
||||||
|
(
|
||||||
|
`guid`,`id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`,
|
||||||
|
`position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`,
|
||||||
|
`currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`,
|
||||||
|
`unit_flags`, `dynamicflags`, `old_guid`
|
||||||
|
) SELECT
|
||||||
|
`guid`,`id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`,
|
||||||
|
`position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`,
|
||||||
|
`currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`,
|
||||||
|
`unit_flags`, `dynamicflags`, `guid`
|
||||||
|
FROM `creature` WHERE `guid` >= 250001 ORDER BY `id` ASC;
|
||||||
|
|
||||||
|
UPDATE game_event_npc_vendor p
|
||||||
|
INNER JOIN creature_temp pp
|
||||||
|
ON p.guid = pp.old_guid
|
||||||
|
SET p.new_guid = pp.guid;
|
||||||
|
UPDATE game_event_npcflag p
|
||||||
|
INNER JOIN creature_temp pp
|
||||||
|
ON p.guid = pp.old_guid
|
||||||
|
SET p.new_guid = pp.guid;
|
||||||
|
UPDATE game_event_model_equip p
|
||||||
|
INNER JOIN creature_temp pp
|
||||||
|
ON p.guid = pp.old_guid
|
||||||
|
SET p.new_guid = pp.guid;
|
||||||
|
UPDATE creature_addon p
|
||||||
|
INNER JOIN creature_temp pp
|
||||||
|
ON p.guid = pp.old_guid
|
||||||
|
SET p.new_guid = pp.guid;
|
||||||
|
UPDATE creature_formations p
|
||||||
|
INNER JOIN creature_temp pp
|
||||||
|
ON p.leaderGUID = pp.old_guid
|
||||||
|
SET p.new_guid_leader = pp.guid;
|
||||||
|
UPDATE creature_formations p
|
||||||
|
INNER JOIN creature_temp pp
|
||||||
|
ON p.memberGUID = pp.old_guid
|
||||||
|
SET p.new_guid_member = pp.guid;
|
||||||
|
UPDATE game_event_creature p
|
||||||
|
INNER JOIN creature_temp pp
|
||||||
|
ON p.guid = pp.old_guid
|
||||||
|
SET p.new_guid = pp.guid;
|
||||||
|
UPDATE pool_creature p
|
||||||
|
INNER JOIN creature_temp pp
|
||||||
|
ON p.guid = pp.old_guid
|
||||||
|
SET p.new_guid = pp.guid;
|
||||||
|
UPDATE smart_scripts p
|
||||||
|
INNER JOIN creature_temp pp
|
||||||
|
ON p.entryorguid = pp.old_guid
|
||||||
|
SET p.new_guid = -pp.guid
|
||||||
|
WHERE
|
||||||
|
entryorguid < 0 AND
|
||||||
|
source_type = 0;
|
||||||
|
|
||||||
|
DROP TABLE `creature`;
|
||||||
|
ALTER TABLE `creature_temp` DROP COLUMN `old_guid`;
|
||||||
|
RENAME TABLE `creature_temp` TO `creature`;
|
||||||
|
|
||||||
|
ALTER TABLE game_event_npc_vendor DISABLE KEYS;
|
||||||
|
UPDATE `game_event_npc_vendor` SET `guid`=`new_guid`;
|
||||||
|
ALTER TABLE `game_event_npc_vendor` DROP COLUMN `new_guid`;
|
||||||
|
ALTER TABLE game_event_npc_vendor ENABLE KEYS;
|
||||||
|
|
||||||
|
ALTER TABLE game_event_npcflag DISABLE KEYS;
|
||||||
|
UPDATE `game_event_npcflag` SET `guid`=`new_guid`;
|
||||||
|
ALTER TABLE `game_event_npcflag` DROP COLUMN `new_guid`;
|
||||||
|
ALTER TABLE game_event_npcflag ENABLE KEYS;
|
||||||
|
|
||||||
|
ALTER TABLE game_event_model_equip DISABLE KEYS;
|
||||||
|
UPDATE `game_event_model_equip` SET `guid`=`new_guid`;
|
||||||
|
ALTER TABLE `game_event_model_equip` DROP COLUMN `new_guid`;
|
||||||
|
ALTER TABLE game_event_model_equip ENABLE KEYS;
|
||||||
|
|
||||||
|
ALTER TABLE `creature_addon` DROP PRIMARY KEY;
|
||||||
|
UPDATE `creature_addon` SET `guid`=`new_guid`;
|
||||||
|
ALTER TABLE `creature_addon` DROP COLUMN `new_guid`;
|
||||||
|
ALTER TABLE `creature_addon` ADD PRIMARY KEY(`guid`);
|
||||||
|
|
||||||
|
ALTER TABLE creature_formations DISABLE KEYS;
|
||||||
|
UPDATE `creature_formations` SET leaderGUID = new_guid_leader;
|
||||||
|
ALTER TABLE `creature_formations` DROP COLUMN `new_guid_leader`;
|
||||||
|
UPDATE `creature_formations` SET memberGUID = new_guid_member;
|
||||||
|
ALTER TABLE `creature_formations` DROP COLUMN `new_guid_member`;
|
||||||
|
ALTER TABLE creature_formations ENABLE KEYS;
|
||||||
|
|
||||||
|
ALTER TABLE `game_event_creature` DROP PRIMARY KEY;
|
||||||
|
UPDATE `game_event_creature` SET guid = new_guid;
|
||||||
|
ALTER TABLE `game_event_creature` DROP COLUMN `new_guid`;
|
||||||
|
ALTER TABLE `game_event_creature` ADD PRIMARY KEY(`guid`, `eventEntry`);
|
||||||
|
|
||||||
|
ALTER TABLE `pool_creature` DROP PRIMARY KEY;
|
||||||
|
UPDATE `pool_creature` SET guid = new_guid;
|
||||||
|
ALTER TABLE `pool_creature` DROP COLUMN `new_guid`;
|
||||||
|
ALTER TABLE `pool_creature` ADD PRIMARY KEY(`guid`);
|
||||||
|
|
||||||
|
ALTER TABLE `smart_scripts` DROP PRIMARY KEY;
|
||||||
|
UPDATE `smart_scripts` SET `entryorguid` = `new_guid`
|
||||||
|
WHERE entryorguid < 0 AND new_guid < 0 AND source_type = 0;
|
||||||
|
ALTER TABLE `smart_scripts` DROP COLUMN `new_guid`;
|
||||||
|
ALTER TABLE `smart_scripts` ADD PRIMARY KEY (`entryorguid`,`source_type`,`id`,`link`);
|
||||||
|
|
||||||
|
END */;;
|
||||||
|
|
||||||
@@ -368,7 +368,7 @@ void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float spee
|
|||||||
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED);
|
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MotionMaster::MoveFall()
|
void MotionMaster::MoveFall(uint32 id/*=0*/)
|
||||||
{
|
{
|
||||||
// use larger distance for vmap height search than in most other cases
|
// use larger distance for vmap height search than in most other cases
|
||||||
float tz = i_owner->GetMap()->GetHeight(i_owner->GetPositionX(), i_owner->GetPositionY(), i_owner->GetPositionZ(), true, MAX_FALL_DISTANCE);
|
float tz = i_owner->GetMap()->GetHeight(i_owner->GetPositionX(), i_owner->GetPositionY(), i_owner->GetPositionZ(), true, MAX_FALL_DISTANCE);
|
||||||
@@ -387,7 +387,7 @@ void MotionMaster::MoveFall()
|
|||||||
init.MoveTo(i_owner->GetPositionX(),i_owner->GetPositionY(),tz);
|
init.MoveTo(i_owner->GetPositionX(),i_owner->GetPositionY(),tz);
|
||||||
init.SetFall();
|
init.SetFall();
|
||||||
init.Launch();
|
init.Launch();
|
||||||
Mutate(new EffectMovementGenerator(0), MOTION_SLOT_CONTROLLED);
|
Mutate(new EffectMovementGenerator(id), MOTION_SLOT_CONTROLLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MotionMaster::MoveCharge(float x, float y, float z, float speed, uint32 id)
|
void MotionMaster::MoveCharge(float x, float y, float z, float speed, uint32 id)
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ class MotionMaster //: private std::stack<MovementGenerator *>
|
|||||||
void MoveKnockbackFrom(float srcX, float srcY, float speedXY, float speedZ);
|
void MoveKnockbackFrom(float srcX, float srcY, float speedXY, float speedZ);
|
||||||
void MoveJumpTo(float angle, float speedXY, float speedZ);
|
void MoveJumpTo(float angle, float speedXY, float speedZ);
|
||||||
void MoveJump(float x, float y, float z, float speedXY, float speedZ, uint32 id = 0);
|
void MoveJump(float x, float y, float z, float speedXY, float speedZ, uint32 id = 0);
|
||||||
void MoveFall();
|
void MoveFall(uint32 id = 0);
|
||||||
|
|
||||||
void MoveSeekAssistance(float x, float y, float z);
|
void MoveSeekAssistance(float x, float y, float z);
|
||||||
void MoveSeekAssistanceDistract(uint32 timer);
|
void MoveSeekAssistanceDistract(uint32 timer);
|
||||||
|
|||||||
+27
-22
@@ -122,6 +122,11 @@ const Position SphereSpawn[6] =
|
|||||||
{ 706.6383f, 161.5266f, 155.6701f, 0 },
|
{ 706.6383f, 161.5266f, 155.6701f, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum MovementPoints
|
||||||
|
{
|
||||||
|
POINT_FALL_GROUND = 1
|
||||||
|
};
|
||||||
|
|
||||||
class boss_anubarak_trial : public CreatureScript
|
class boss_anubarak_trial : public CreatureScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -553,68 +558,68 @@ public:
|
|||||||
|
|
||||||
class mob_frost_sphere : public CreatureScript
|
class mob_frost_sphere : public CreatureScript
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
mob_frost_sphere() : CreatureScript("mob_frost_sphere") { }
|
mob_frost_sphere() : CreatureScript("mob_frost_sphere") { }
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const
|
|
||||||
{
|
|
||||||
return new mob_frost_sphereAI(creature);
|
|
||||||
};
|
|
||||||
|
|
||||||
struct mob_frost_sphereAI : public ScriptedAI
|
struct mob_frost_sphereAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
mob_frost_sphereAI(Creature* creature) : ScriptedAI(creature)
|
mob_frost_sphereAI(Creature* creature) : ScriptedAI(creature)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool m_bFall;
|
|
||||||
float x, y, z;
|
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
m_bFall = false;
|
_isFalling = false;
|
||||||
me->SetReactState(REACT_PASSIVE);
|
me->SetReactState(REACT_PASSIVE);
|
||||||
me->SetFlying(true);
|
me->SetFlying(true);
|
||||||
me->SetDisplayId(25144);
|
me->SetDisplayId(me->GetCreatureInfo()->Modelid2);
|
||||||
me->SetSpeed(MOVE_RUN, 0.5f, false);
|
me->SetSpeed(MOVE_RUN, 0.5f, false);
|
||||||
me->GetMotionMaster()->MoveRandom(20.0f);
|
me->GetMotionMaster()->MoveRandom(20.0f);
|
||||||
DoCast(SPELL_FROST_SPHERE);
|
DoCast(SPELL_FROST_SPHERE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DamageTaken(Unit* /*who*/, uint32& uiDamage)
|
void DamageTaken(Unit* /*who*/, uint32& damage)
|
||||||
{
|
{
|
||||||
if (me->GetHealth() < uiDamage)
|
if (me->GetHealth() <= damage)
|
||||||
{
|
{
|
||||||
uiDamage = 0;
|
damage = 0;
|
||||||
if (!m_bFall)
|
if (!_isFalling)
|
||||||
{
|
{
|
||||||
m_bFall = true;
|
_isFalling = true;
|
||||||
me->GetMotionMaster()->MoveIdle();
|
me->GetMotionMaster()->MoveIdle();
|
||||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
//At hit the ground
|
//At hit the ground
|
||||||
me->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH);
|
me->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH);
|
||||||
me->GetMotionMaster()->MoveFall();
|
me->GetMotionMaster()->MoveFall(POINT_FALL_GROUND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MovementInform(uint32 uiType, uint32 uiId)
|
void MovementInform(uint32 type, uint32 pointId)
|
||||||
{
|
{
|
||||||
if (uiType != POINT_MOTION_TYPE) return;
|
if (type != EFFECT_MOTION_TYPE)
|
||||||
|
return;
|
||||||
|
|
||||||
switch (uiId)
|
switch (pointId)
|
||||||
{
|
{
|
||||||
case 0:
|
case POINT_FALL_GROUND:
|
||||||
me->RemoveAurasDueToSpell(SPELL_FROST_SPHERE);
|
me->RemoveAurasDueToSpell(SPELL_FROST_SPHERE);
|
||||||
me->SetDisplayId(11686);
|
me->SetDisplayId(me->GetCreatureInfo()->Modelid1);
|
||||||
DoCast(SPELL_PERMAFROST_VISUAL);
|
DoCast(SPELL_PERMAFROST_VISUAL);
|
||||||
DoCast(SPELL_PERMAFROST);
|
DoCast(SPELL_PERMAFROST);
|
||||||
me->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.0f);
|
me->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.0f);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool _isFalling;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CreatureAI* GetAI(Creature* creature) const
|
||||||
|
{
|
||||||
|
return new mob_frost_sphereAI(creature);
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class mob_anubarak_spike : public CreatureScript
|
class mob_anubarak_spike : public CreatureScript
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ class boss_sindragosa : public CreatureScript
|
|||||||
|
|
||||||
void MovementInform(uint32 type, uint32 point)
|
void MovementInform(uint32 type, uint32 point)
|
||||||
{
|
{
|
||||||
if (type != POINT_MOTION_TYPE)
|
if (type != POINT_MOTION_TYPE && type != EFFECT_MOTION_TYPE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch (point)
|
switch (point)
|
||||||
|
|||||||
@@ -94,6 +94,11 @@ enum SvalaPhase
|
|||||||
SVALADEAD
|
SVALADEAD
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum SvalaPoint
|
||||||
|
{
|
||||||
|
POINT_FALL_GROUND = 1,
|
||||||
|
};
|
||||||
|
|
||||||
#define DATA_INCREDIBLE_HULK 2043
|
#define DATA_INCREDIBLE_HULK 2043
|
||||||
|
|
||||||
static const float spectatorWP[2][3] =
|
static const float spectatorWP[2][3] =
|
||||||
@@ -258,16 +263,16 @@ public:
|
|||||||
|
|
||||||
SetCombatMovement(false);
|
SetCombatMovement(false);
|
||||||
me->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH);
|
me->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH);
|
||||||
me->GetMotionMaster()->MoveFall();
|
me->GetMotionMaster()->MoveFall(POINT_FALL_GROUND);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MovementInform(uint32 motionType, uint32 pointId)
|
void MovementInform(uint32 motionType, uint32 pointId)
|
||||||
{
|
{
|
||||||
if (motionType != POINT_MOTION_TYPE)
|
if (motionType != EFFECT_MOTION_TYPE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (pointId == 1)
|
if (pointId == POINT_FALL_GROUND)
|
||||||
me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
me->DealDamage(me, me->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -288,7 +293,7 @@ public:
|
|||||||
Phase = NORMAL;
|
Phase = NORMAL;
|
||||||
SetCombatMovement(true);
|
SetCombatMovement(true);
|
||||||
|
|
||||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 300, true))
|
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 300.0f, true))
|
||||||
me->GetMotionMaster()->MoveChase(target);
|
me->GetMotionMaster()->MoveChase(target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -330,7 +335,7 @@ public:
|
|||||||
{
|
{
|
||||||
std::list<Creature*> lspectatorList;
|
std::list<Creature*> lspectatorList;
|
||||||
GetCreatureListWithEntryInGrid(lspectatorList, me, CREATURE_SPECTATOR, 100.0f);
|
GetCreatureListWithEntryInGrid(lspectatorList, me, CREATURE_SPECTATOR, 100.0f);
|
||||||
for(std::list<Creature*>::iterator itr = lspectatorList.begin(); itr != lspectatorList.end(); ++itr)
|
for (std::list<Creature*>::iterator itr = lspectatorList.begin(); itr != lspectatorList.end(); ++itr)
|
||||||
{
|
{
|
||||||
if ((*itr)->isAlive())
|
if ((*itr)->isAlive())
|
||||||
{
|
{
|
||||||
@@ -397,7 +402,8 @@ public:
|
|||||||
Phase = NORMAL;
|
Phase = NORMAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else introTimer -= diff;
|
}
|
||||||
|
else introTimer -= diff;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user