Merge remote-tracking branch 'origin/master' into 4.3.4
Conflicts: src/server/game/AI/EventAI/CreatureEventAI.cpp src/server/scripts/Kalimdor/zone_desolace.cpp
This commit is contained in:
commit
b2134dbbe3
13 files changed
+200
-16
No files matched your search
@@ -0,0 +1,24 @@
|
||||
SET @NPC_BLUE_KC := 32242; -- Blue Sample KC Bunny
|
||||
SET @NPC_GREEN_KC := 32244; -- Green Sample KC Bunny
|
||||
SET @NPC_DARK_KC := 32245; -- Dark Sample KC Bunny
|
||||
SET @SPELL_COLLECT := 60256; -- Collect Sample
|
||||
SET @SPELL_WRITHING := 60310; -- Throw Writhing Mass
|
||||
SET @NPC_MASS_KC := 32266; -- Writhing Mass KC Bunny
|
||||
SET @ITEM_ESSENCE := 44301; -- Tainted Essence
|
||||
|
||||
UPDATE `creature_template` SET `AIName`='SmartAI',`flags_extra`=128 WHERE `entry` IN (@NPC_BLUE_KC,@NPC_GREEN_KC,@NPC_DARK_KC);
|
||||
UPDATE `creature` SET `MovementType`=0 WHERE `id` IN (@NPC_BLUE_KC,@NPC_GREEN_KC,@NPC_DARK_KC);
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_BLUE_KC,@NPC_GREEN_KC,@NPC_DARK_KC) AND `source_type`=0;
|
||||
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
|
||||
(@NPC_BLUE_KC,0,0,0,8,0,100,0,@SPELL_COLLECT,0,0,0,33,@NPC_BLUE_KC,0,0,0,0,0,7,0,0,0,0,0,0,0,"Blue Sample KC Bunny - On spellhit - Killed moster credit"),
|
||||
(@NPC_BLUE_KC,0,1,2,8,0,100,0,@SPELL_WRITHING,0,0,0,33,@NPC_MASS_KC,0,0,0,0,0,7,0,0,0,0,0,0,0,"Blue Sample KC Bunny - On spellhit - Killed moster credit"),
|
||||
(@NPC_BLUE_KC,0,2,0,61,0,100,0,0,0,0,0,11,60505,0,0,0,0,0,7,0,0,0,0,0,0,0,"Blue Sample KC Bunny - On Link - Cast Fury of the Fallen Cultist to Invoker"),
|
||||
--
|
||||
(@NPC_GREEN_KC,0,0,0,8,0,100,0,@SPELL_COLLECT,0,0,0,33,@NPC_GREEN_KC,0,0,0,0,0,7,0,0,0,0,0,0,0,"Green Sample KC Bunny - On spellhit - Killed moster credit"),
|
||||
(@NPC_GREEN_KC,0,1,2,8,0,100,0,@SPELL_WRITHING,0,0,0,33,@NPC_MASS_KC,0,0,0,0,0,7,0,0,0,0,0,0,0,"Green Sample KC Bunny - On spellhit - Killed moster credit"),
|
||||
(@NPC_GREEN_KC,0,2,0,61,0,100,0,0,0,0,0,11,60506,0,0,0,0,0,7,0,0,0,0,0,0,0,"Green Sample KC Bunny - On Link - Cast Blood of the Fallen Cultist to Invoker"),
|
||||
--
|
||||
(@NPC_DARK_KC,0,0,0,8,0,100,0,@SPELL_COLLECT,0,0,0,33,@NPC_DARK_KC,0,0,0,0,0,7,0,0,0,0,0,0,0,"Dark Sample KC Bunny - On spellhit - Killed moster credit"),
|
||||
(@NPC_DARK_KC,0,1,2,8,0,100,0,@SPELL_WRITHING,0,0,0,33,@NPC_MASS_KC,0,0,0,0,0,7,0,0,0,0,0,0,0,"Dark Sample KC Bunny - On spellhit - Killed moster credit"),
|
||||
(@NPC_DARK_KC,0,2,0,61,0,100,0,0,0,0,0,11,60504,0,0,0,0,0,7,0,0,0,0,0,0,0,"Dark Sample KC Bunny - On Link - Cast Agony of the Fallen Cultist to Invoker");
|
||||
@@ -0,0 +1,83 @@
|
||||
-- Out of Body Experience (12327)
|
||||
SET @CGUID = 142712; -- 5 required
|
||||
SET @ARUGAL = 27620; -- Shade of Arugal
|
||||
SET @VALANAR = 27619; -- Valanar
|
||||
SET @THERALDIS = 27624; -- Theraldis
|
||||
SET @KELESETH = 27618; -- Keleseth
|
||||
SET @ATHERANN = 27616; -- Atherann
|
||||
SET @SPELL_OOBE = 49097; -- Out of Body Experience Invisibility + Detection + Teleport Silverpine
|
||||
SET @SPELL_TELEPORT_BACK = 49098; -- Grizzly Hills - Quest - Arugal Teleport Back
|
||||
SET @SPELL_EVENT_CHANNEL = 49128; -- Arugal Event Channel
|
||||
SET @SPELL_CREDIT = 49131; -- Out of Body Experience Quest Credit
|
||||
SET @TRIGGER = 4990; -- Areatrigger
|
||||
|
||||
DELETE FROM `creature` WHERE `id` IN (@ARUGAL,@VALANAR,@THERALDIS,@KELESETH,@ATHERANN);
|
||||
INSERT INTO `creature` (`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`) VALUES
|
||||
(@CGUID+0,@ARUGAL,0,1,1,0,0,-463.526,1499.51,20.4721,1.55035,300,0,0,10635,0,0,0,0,0),
|
||||
(@CGUID+1,@ATHERANN,0,1,1,0,0,-458.712,1504.8,16.9815,3.93558,300,0,0,29820,0,0,0,0,0),
|
||||
(@CGUID+2,@KELESETH,0,1,1,0,0,-471.433,1500.51,18.4603,0.024287,300,0,0,28830,0,0,0,0,0),
|
||||
(@CGUID+3,@VALANAR,0,1,1,0,0,-462.81,1491.7,17.2292,1.65734,300,0,0,96100,3309,0,0,0,0),
|
||||
(@CGUID+4,@THERALDIS,0,1,1,0,0,-472.925,1495.71,18.3354,0.577431,300,0,0,28830,0,0,0,0,0);
|
||||
|
||||
-- Also serves as a fail safe, if you accidently remove the aura you will be prompted to a credit.
|
||||
DELETE FROM `spell_linked_spell` WHERE `spell_trigger`= -@SPELL_OOBE;
|
||||
INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
|
||||
(-@SPELL_OOBE,@SPELL_TELEPORT_BACK,0,'When Out of Body Experience expires cast Arugal Teleport Back');
|
||||
|
||||
DELETE FROM `spell_target_position` WHERE `id` IN (@SPELL_OOBE,@SPELL_TELEPORT_BACK);
|
||||
INSERT INTO `spell_target_position` (`id`, `effIndex`, `target_map`, `target_position_x`, `target_position_y`, `target_position_z`, `target_orientation`) VALUES
|
||||
(@SPELL_OOBE,1,0,-481.041992,1492.949951,19.932100,0), -- Silverpine Forrest
|
||||
(@SPELL_TELEPORT_BACK,1,571,3842.16,-3428.43,293.105,1.8776); -- Grizzly Hills
|
||||
|
||||
DELETE FROM `creature_text` WHERE `entry` IN (@VALANAR,@THERALDIS);
|
||||
INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
|
||||
(@VALANAR,0,0,'Rise, Arugal! The power of the Lich King commands you!',12,0,100,0,0,0,'Prince Valanar - Silverpine'),
|
||||
(@THERALDIS,0,0,'Yes... he shall suit our needs perfectly. Have him sent to Solstice Village when you''re ready. Arthas will not be pleased if we fall behind schedule.',12,0,100,0,0,0,'Prince Theraldis - Silverpine');
|
||||
|
||||
-- Detection Auras
|
||||
DELETE FROM `creature_template_addon` WHERE `entry` IN (@ARUGAL,@VALANAR,@THERALDIS,@KELESETH,@ATHERANN);
|
||||
INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
|
||||
(@ARUGAL,0,0,0,0,0,'49130'),
|
||||
(@ATHERANN,0,0,0,0,0,'49130'),
|
||||
(@KELESETH,0,0,0,0,0,'49130'),
|
||||
(@VALANAR,0,0,0,0,0,'49130'),
|
||||
(@THERALDIS,0,10721,0,0,0,'49130');
|
||||
|
||||
DELETE FROM `areatrigger_scripts` WHERE `entry`=@TRIGGER;
|
||||
INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES (@TRIGGER,'SmartTrigger');
|
||||
|
||||
UPDATE `creature_template` SET `faction_A`=16, `faction_H`=16, `AIName`='SmartAI' ,`unit_flags`=`unit_flags`|2, `InhabitType` = IF (`entry` =@ARUGAL, 4, `InhabitType`) WHERE `entry` IN (@ARUGAL,@VALANAR,@THERALDIS,@KELESETH,@ATHERANN);
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE `source_type` = 2 AND `entryorguid`= @TRIGGER;
|
||||
DELETE FROM `smart_scripts` WHERE `source_type` = 0 AND `entryorguid` IN (@ARUGAL,@VALANAR,@THERALDIS,@KELESETH,@ATHERANN);
|
||||
DELETE FROM `smart_scripts` WHERE `source_type` = 9 AND `entryorguid` =@ARUGAL*100;
|
||||
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,2,0,0,46,0,100,0,@TRIGGER,0,0,0,45,0,1,0,0,0,0,10,@CGUID+0,0,0,0,0,0,0,'On Trigger - Set data 0 1 Shade of Arugal'),
|
||||
--
|
||||
(@ARUGAL,0,0,0,11,0,100,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Shade of Arugal - on Spawn - React State Passive'),
|
||||
(@ARUGAL,0,1,0,38,0,100,0,0,1,0,0,80,@ARUGAL*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Shade of Arugal - on Data set 0 1 - Run script'),
|
||||
--
|
||||
(@VALANAR,0,0,0,11,0,100,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Valanar - on Spawn - react Passive'),
|
||||
(@VALANAR,0,1,0,1,0,100,0,0,0,0,0,11,@SPELL_EVENT_CHANNEL,2,0,0,0,0,11,@ARUGAL,20,0,0,0,0,0,'Valanar - OOC - cast Arugal Event Channel'),
|
||||
(@VALANAR,0,2,0,38,0,100,0,0,1,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Valanar - on Data set 0 1 - Say text'),
|
||||
--
|
||||
(@KELESETH,0,0,0,11,0,100,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keleseth - on Spawn - react Passive'),
|
||||
(@KELESETH,0,1,0,1,0,100,0,0,0,0,0,11,@SPELL_EVENT_CHANNEL,2,0,0,0,0,11,@ARUGAL,20,0,0,0,0,0,'Keleseth - OOC - cast Arugal Event Channel'),
|
||||
--
|
||||
(@ATHERANN,0,0,0,11,0,100,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Atherann - on Spawn - react Passive'),
|
||||
(@ATHERANN,0,1,0,1,0,100,0,0,0,0,0,11,@SPELL_EVENT_CHANNEL,2,0,0,0,0,11,@ARUGAL,20,0,0,0,0,0,'Atherann - OOC - cast Arugal Event Channel'),
|
||||
--
|
||||
(@THERALDIS,0,0,0,11,0,100,0,0,0,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Theraldis - on Spawn - react Passive'),
|
||||
(@THERALDIS,0,1,0,38,0,100,0,0,1,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Theraldis - on Data set 0 1 - Say text'),
|
||||
--
|
||||
(@ARUGAL*100,9,0,0,0,0,100,1,5000,5000,0,0,45,0,1,0,0,0,0,19,@VALANAR,20,0,0,0,0,0,'On script - set Data 0 1 Prince Valanar'), -- prevent multiple events during an event
|
||||
(@ARUGAL*100,9,1,0,0,0,100,0,8000,8000,0,0,45,0,1,0,0,0,0,19,@THERALDIS,20,0,0,0,0,0,'On script - set Data 0 1 Prince Theraldis'),
|
||||
(@ARUGAL*100,9,2,0,0,0,100,0,0,0,0,0,11,@SPELL_CREDIT,2,0,0,0,0,17,0,30,0,0,0,0,0,'On script - cast Out of Body Experience Quest Credit'),
|
||||
(@ARUGAL*100,9,3,0,0,0,100,0,0,0,0,0,78,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'On script - call script reset');
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=@SPELL_EVENT_CHANNEL;
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=@TRIGGER;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(13,1,@SPELL_EVENT_CHANNEL,0,0,31,0,3,@ARUGAL,0,0,0,'','Arugal Event Channel targets Shade of Arugal'),
|
||||
(22,1,@TRIGGER,2,0,1,0,@SPELL_OOBE,0,0,0,0,'','SAI areatrigger 4990 triggers only if player has aura Out of Body Experience'),
|
||||
(22,1,@TRIGGER,2,0,9,0,12327,0,0,0,0,'','SAI areatrigger 4990 triggers only if player has taken Quest Out of Body Experience');
|
||||
@@ -0,0 +1,46 @@
|
||||
-- Ribbly Screwspigot 9543
|
||||
SET @GOSSIP := 1970;
|
||||
SET @RIBBLY := 9543;
|
||||
SET @CRONY := 10043;
|
||||
|
||||
DELETE FROM `creature_equip_template` WHERE `entry` =@RIBBLY;
|
||||
INSERT INTO `creature_equip_template` (`entry`, `itemEntry1`, `itemEntry2`, `itemEntry3`) VALUES
|
||||
(@RIBBLY, 5280, 0, 0); -- Ribbly Screwspigot
|
||||
|
||||
DELETE FROM `creature_template_addon` WHERE `entry` =@RIBBLY;
|
||||
INSERT INTO `creature_template_addon` (`entry`, `mount`, `bytes1`, `bytes2`, `auras`) VALUES
|
||||
(@RIBBLY, 0, 0x0, 0x1, ''); -- Ribbly Screwspigot
|
||||
|
||||
DELETE FROM `gossip_menu` WHERE `entry` =@GOSSIP;
|
||||
INSERT INTO `gossip_menu` (`entry`, `text_id`) VALUES
|
||||
(@GOSSIP, 2643);
|
||||
|
||||
DELETE FROM `gossip_menu_option` WHERE `menu_id` =@GOSSIP;
|
||||
INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`) VALUES
|
||||
(@GOSSIP,0,0, 'You''re good for nothing, Ribbly. It''s time to pay for your wickedness!.', 1, 1, 0, 0, 0, 0, '');
|
||||
|
||||
UPDATE `creature_template` SET `AIName`= 'SmartAI',`gossip_menu_id`=@GOSSIP ,`npcflag`=1, `speed_walk`=1.142857, `speed_run`=1, `rangeattacktime`=2000, `unit_flags`=32832, `dynamicflags`=0 WHERE `entry`=@RIBBLY;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` =@RIBBLY;
|
||||
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
|
||||
(@RIBBLY, 0, 0, 0, 25, 0, 100, 0, 0, 0, 0, 0, 2, 735, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ribbly Screwspigot - On Reset - Set Default Faction'),
|
||||
(@RIBBLY, 0, 1, 2, 62, 0, 100, 0, @GOSSIP, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Ribbly Screwspigot - On Gossip Select - Close Menu'),
|
||||
(@RIBBLY, 0, 2, 3, 61, 0, 100, 0, 0, 0, 0, 0, 2, 736, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ribbly Screwspigot - Linked with Previous Event - Set Hostile'),
|
||||
(@RIBBLY, 0, 3, 4, 61, 0, 100, 0, 0, 0, 0, 0, 45, 1, 1, 5000, 0, 0, 0, 11, @CRONY, 10, 100, 0, 0, 0, 0, 'Ribbly Screwspigot - Linked with Previous Event - Send Data 1 1 to Ribblys Cronies'),
|
||||
(@RIBBLY, 0, 4, 0, 61, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Ribbly Screwspigot - Linked with Previous Event - Attack Invoker'),
|
||||
(@RIBBLY, 0, 5, 0, 4 , 0, 100, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ribbly Screwspigot - On Aggro - Say line 0'),
|
||||
(@RIBBLY, 0, 6, 0, 0 , 0, 100, 0, 4000, 12000, 4000, 12000, 11, 12540, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 'Ribbly Screwspigot - IC - Cast Gouge'),
|
||||
(@RIBBLY, 0, 7, 0, 0 , 0, 100, 0, 5000, 14000, 5000, 14000, 11, 9080 , 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 'Ribbly Screwspigot - IC - Cast Hamstring');
|
||||
|
||||
DELETE FROM `creature_text` WHERE `entry` =@RIBBLY;
|
||||
INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES
|
||||
(@RIBBLY, 0, 0, 'No! Get away from me! Help!', 12, 0, 100, 0, 0, 0, 'Ribbly Screwspigot');
|
||||
|
||||
UPDATE `creature_template` SET `AIName`= 'SmartAI',`unit_flags`=576 WHERE `entry`= @CRONY;
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` =@CRONY;
|
||||
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
|
||||
(@CRONY, 0, 0, 0, 25, 0, 100, 0, 0, 0, 0, 0, 2, 735, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ribblys Crony - On Reset - Set Default Faction'),
|
||||
(@CRONY, 0, 1, 2, 38, 0, 100, 0, 1, 1, 0, 0, 2, 736, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Ribblys Crony - On Data Set 1 1 - Set Hostile'),
|
||||
(@CRONY, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 18, 40, 0, 0, 0, 0, 0, 0, 'Ribblys Crony - Linked with Previous Event - Attack'),
|
||||
(@CRONY, 0, 3, 0, 0, 0, 100, 0, 5000, 14000, 5000, 14000, 11, 15692, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Ribblys Crony - IC - Cast Eviscerate'),
|
||||
(@CRONY, 0, 4, 0, 0, 0, 100, 0, 2000, 11000, 2000, 11000, 11, 15581, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Ribblys Crony - IC - Cast Sinister Strike'),
|
||||
(@CRONY, 0, 5, 0, 0, 0, 100, 0, 8000, 18000, 8000, 18000, 11, 13298, 0, 0, 0, 0, 0, 2, 32, 0, 0, 0, 0, 0, 0, 'Ribblys Crony - IC - Cast Poison');
|
||||
@@ -342,7 +342,7 @@ bool ChatHandler::ExecuteCommandInTable(ChatCommand* table, const char* text, co
|
||||
{
|
||||
if (!ExecuteCommandInTable(table[i].ChildCommands, text, fullcmd))
|
||||
{
|
||||
if (text && text[0] != '\0')
|
||||
if (text[0] != '\0')
|
||||
SendSysMessage(LANG_NO_SUBCMD);
|
||||
else
|
||||
SendSysMessage(LANG_CMD_SYNTAX);
|
||||
|
||||
@@ -35,6 +35,9 @@ HostileRefManager::~HostileRefManager()
|
||||
|
||||
void HostileRefManager::threatAssist(Unit* victim, float baseThreat, SpellInfo const* threatSpell)
|
||||
{
|
||||
if (getSize() == 0)
|
||||
return;
|
||||
|
||||
HostileReference* ref = getFirst();
|
||||
float threat = ThreatCalcHelper::calcThreat(victim, iOwner, baseThreat, (threatSpell ? threatSpell->GetSchoolMask() : SPELL_SCHOOL_MASK_NORMAL), threatSpell);
|
||||
threat /= getSize();
|
||||
|
||||
@@ -2389,8 +2389,6 @@ TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropert
|
||||
case UNIT_MASK_MINION:
|
||||
summon = new Minion(properties, summoner, false);
|
||||
break;
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!summon->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), this, phase, entry, vehId, team, pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation()))
|
||||
|
||||
@@ -977,7 +977,6 @@ bool Guardian::UpdateStats(Stats stat)
|
||||
{
|
||||
case STAT_STAMINA: mod = 0.3f; break; // Default Owner's Stamina scale
|
||||
case STAT_STRENGTH: mod = 0.7f; break; // Default Owner's Strength scale
|
||||
default: break;
|
||||
}
|
||||
|
||||
// Check just if owner has Ravenous Dead since it's effect is not an aura
|
||||
|
||||
@@ -12838,8 +12838,6 @@ void Unit::UpdateReactives(uint32 p_time)
|
||||
if (getClass() == CLASS_WARRIOR && GetTypeId() == TYPEID_PLAYER)
|
||||
ToPlayer()->ClearComboPoints();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -156,14 +156,14 @@ void InstanceSaveManager::RemoveInstanceSave(uint32 InstanceId)
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
|
||||
delete itr->second;
|
||||
itr->second->SetToDelete(true);
|
||||
m_instanceSaveById.erase(itr);
|
||||
}
|
||||
}
|
||||
|
||||
InstanceSave::InstanceSave(uint16 MapId, uint32 InstanceId, Difficulty difficulty, time_t resetTime, bool canReset)
|
||||
: m_resetTime(resetTime), m_instanceid(InstanceId), m_mapid(MapId),
|
||||
m_difficulty(difficulty), m_canReset(canReset)
|
||||
m_difficulty(difficulty), m_canReset(canReset), m_toDelete(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -81,10 +81,29 @@ class InstanceSave
|
||||
/* online players bound to the instance (perm/solo)
|
||||
does not include the members of the group unless they have permanent saves */
|
||||
void AddPlayer(Player* player) { TRINITY_GUARD(ACE_Thread_Mutex, _lock); m_playerList.push_back(player); }
|
||||
bool RemovePlayer(Player* player) { TRINITY_GUARD(ACE_Thread_Mutex, _lock); m_playerList.remove(player); return UnloadIfEmpty(); }
|
||||
bool RemovePlayer(Player* player)
|
||||
{
|
||||
_lock.acquire();
|
||||
m_playerList.remove(player);
|
||||
bool isStillValid = UnloadIfEmpty();
|
||||
_lock.release();
|
||||
|
||||
//delete here if needed, after releasing the lock
|
||||
if(m_toDelete)
|
||||
delete this;
|
||||
|
||||
return isStillValid;
|
||||
}
|
||||
/* all groups bound to the instance */
|
||||
void AddGroup(Group* group) { m_groupList.push_back(group); }
|
||||
bool RemoveGroup(Group* group) { m_groupList.remove(group); return UnloadIfEmpty(); }
|
||||
bool RemoveGroup(Group* group)
|
||||
{
|
||||
m_groupList.remove(group);
|
||||
bool isStillValid = UnloadIfEmpty();
|
||||
if(m_toDelete)
|
||||
delete this;
|
||||
return isStillValid;
|
||||
}
|
||||
|
||||
/* instances cannot be reset (except at the global reset time)
|
||||
if there are players permanently bound to it
|
||||
@@ -96,6 +115,12 @@ class InstanceSave
|
||||
but that would depend on a lot of things that can easily change in future */
|
||||
Difficulty GetDifficulty() const { return m_difficulty; }
|
||||
|
||||
/* used to flag the InstanceSave as to be deleted, so the caller can delete it */
|
||||
void SetToDelete(bool toDelete)
|
||||
{
|
||||
m_toDelete = toDelete;
|
||||
}
|
||||
|
||||
typedef std::list<Player*> PlayerListType;
|
||||
typedef std::list<Group*> GroupListType;
|
||||
private:
|
||||
@@ -110,6 +135,7 @@ class InstanceSave
|
||||
uint32 m_mapid;
|
||||
Difficulty m_difficulty;
|
||||
bool m_canReset;
|
||||
bool m_toDelete;
|
||||
|
||||
ACE_Thread_Mutex _lock;
|
||||
};
|
||||
|
||||
@@ -835,8 +835,6 @@ class npc_halion_controller : public CreatureScript
|
||||
_twilightDamageTaken = 0;
|
||||
return;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
_materialDamageTaken = 0;
|
||||
|
||||
@@ -59,10 +59,10 @@ ThreadPriority::ThreadPriority()
|
||||
}
|
||||
}
|
||||
|
||||
//since we have only 7(seven) values in enum Priority
|
||||
//and 3 we know already (Idle, Normal, Realtime) so
|
||||
//we need to split each list [Idle...Normal] and [Normal...Realtime]
|
||||
//into piecies
|
||||
// since we have only 7(seven) values in enum Priority
|
||||
// and 3 we know already (Idle, Normal, Realtime) so
|
||||
// we need to split each list [Idle...Normal] and [Normal...Realtime]
|
||||
// into pieces
|
||||
const size_t _divider = 4;
|
||||
size_t _div = (norm_pos - min_pos) / _divider;
|
||||
if (_div == 0)
|
||||
|
||||
@@ -246,11 +246,20 @@ namespace MMAP
|
||||
printf("Building mesh from file\n");
|
||||
int tileX, tileY, mapId;
|
||||
if (fread(&mapId, sizeof(int), 1, file) != 1)
|
||||
{
|
||||
fclose(file);
|
||||
return;
|
||||
}
|
||||
if (fread(&tileX, sizeof(int), 1, file) != 1)
|
||||
{
|
||||
fclose(file);
|
||||
return;
|
||||
}
|
||||
if (fread(&tileY, sizeof(int), 1, file) != 1)
|
||||
{
|
||||
fclose(file);
|
||||
return;
|
||||
}
|
||||
|
||||
dtNavMesh* navMesh = NULL;
|
||||
buildNavMesh(mapId, navMesh);
|
||||
|
||||
Reference in new issue
Block a user