diff options
21 files changed, 186 insertions, 34 deletions
diff --git a/sql/updates/world/2013_08_26_00_world_sai.sql b/sql/updates/world/2013_08_26_00_world_sai.sql new file mode 100644 index 00000000000..c4029aace79 --- /dev/null +++ b/sql/updates/world/2013_08_26_00_world_sai.sql @@ -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'); diff --git a/sql/updates/world/2013_08_26_01_world_sai.sql b/sql/updates/world/2013_08_26_01_world_sai.sql new file mode 100644 index 00000000000..965f48ce7d3 --- /dev/null +++ b/sql/updates/world/2013_08_26_01_world_sai.sql @@ -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'); diff --git a/sql/updates/world/2013_08_26_02_world_db_errors.sql b/sql/updates/world/2013_08_26_02_world_db_errors.sql new file mode 100644 index 00000000000..17c1d54d5a6 --- /dev/null +++ b/sql/updates/world/2013_08_26_02_world_db_errors.sql @@ -0,0 +1,3 @@ +DELETE FROM `creature_equip_template` WHERE `entry` =9543; +INSERT INTO `creature_equip_template` (`entry`, `id`, `itemEntry1`, `itemEntry2`, `itemEntry3`) VALUES +(9543, 1, 5280, 0, 0); diff --git a/src/server/game/AI/EventAI/CreatureEventAI.cpp b/src/server/game/AI/EventAI/CreatureEventAI.cpp index d1bfc7403e9..39fcedf9a33 100644 --- a/src/server/game/AI/EventAI/CreatureEventAI.cpp +++ b/src/server/game/AI/EventAI/CreatureEventAI.cpp @@ -1085,7 +1085,6 @@ inline uint32 CreatureEventAI::GetRandActionParam(uint32 rnd, uint32 param1, uin case 1: return param2; case 2: return param3; } - return 0; } inline int32 CreatureEventAI::GetRandActionParam(uint32 rnd, int32 param1, int32 param2, int32 param3) @@ -1096,7 +1095,6 @@ inline int32 CreatureEventAI::GetRandActionParam(uint32 rnd, int32 param1, int32 case 1: return param2; case 2: return param3; } - return 0; } inline Unit* CreatureEventAI::GetTargetByType(uint32 target, Unit* actionInvoker) diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index b4e18b66a69..41dae740e59 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -2231,6 +2231,7 @@ SmartScriptHolder SmartScript::CreateEvent(SMART_EVENT e, uint32 event_flags, ui script.event.raw.param4 = event_param4; script.event.event_phase_mask = phaseMask; script.event.event_flags = event_flags; + script.event.event_chance = 100; script.action.type = action; script.action.raw.param1 = action_param1; diff --git a/src/server/game/Chat/Chat.cpp b/src/server/game/Chat/Chat.cpp index f61380b6834..4364fb61626 100644 --- a/src/server/game/Chat/Chat.cpp +++ b/src/server/game/Chat/Chat.cpp @@ -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); diff --git a/src/server/game/Combat/HostileRefManager.cpp b/src/server/game/Combat/HostileRefManager.cpp index 4cd76b4e7a2..1e550596368 100644 --- a/src/server/game/Combat/HostileRefManager.cpp +++ b/src/server/game/Combat/HostileRefManager.cpp @@ -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(); diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp index ec6a3e518c4..6cd61dc043c 100644 --- a/src/server/game/Entities/Object/Object.cpp +++ b/src/server/game/Entities/Object/Object.cpp @@ -2230,8 +2230,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())) diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp index e6cc30c867a..e94fb726387 100644 --- a/src/server/game/Entities/Unit/StatSystem.cpp +++ b/src/server/game/Entities/Unit/StatSystem.cpp @@ -1113,7 +1113,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 diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 7e67a9e6e09..ef4829a8788 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -14568,8 +14568,6 @@ void Unit::UpdateReactives(uint32 p_time) if (getClass() == CLASS_WARRIOR && GetTypeId() == TYPEID_PLAYER) ToPlayer()->ClearComboPoints(); break; - default: - break; } } else diff --git a/src/server/game/Guilds/Guild.h b/src/server/game/Guilds/Guild.h index f6a3e095957..ac2ae2c967b 100644 --- a/src/server/game/Guilds/Guild.h +++ b/src/server/game/Guilds/Guild.h @@ -292,6 +292,7 @@ private: m_zoneId(0), m_level(0), m_class(0), + m_flags(GUILDMEMBER_STATUS_NONE), m_logoutTime(::time(NULL)), m_accountId(0), m_rankId(rankId) diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp index 2abfcead826..fffd6be8e9b 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp @@ -367,21 +367,21 @@ public: std::vector<InfernalPoint*>::iterator itr = positions.begin()+rand()%positions.size(); point = *itr; positions.erase(itr); - pos.Relocate(point->x, point->y, INFERNAL_Z); + pos.Relocate(point->x, point->y, INFERNAL_Z, 0.0f); } - Creature* Infernal = me->SummonCreature(NETHERSPITE_INFERNAL, pos, TEMPSUMMON_TIMED_DESPAWN, 180000); + Creature* infernal = me->SummonCreature(NETHERSPITE_INFERNAL, pos, TEMPSUMMON_TIMED_DESPAWN, 180000); - if (Infernal) + if (infernal) { - Infernal->SetDisplayId(INFERNAL_MODEL_INVISIBLE); - Infernal->setFaction(me->getFaction()); + infernal->SetDisplayId(INFERNAL_MODEL_INVISIBLE); + infernal->setFaction(me->getFaction()); if (point) - CAST_AI(netherspite_infernal::netherspite_infernalAI, Infernal->AI())->point=point; - CAST_AI(netherspite_infernal::netherspite_infernalAI, Infernal->AI())->malchezaar=me->GetGUID(); + CAST_AI(netherspite_infernal::netherspite_infernalAI, infernal->AI())->point=point; + CAST_AI(netherspite_infernal::netherspite_infernalAI, infernal->AI())->malchezaar=me->GetGUID(); - infernals.push_back(Infernal->GetGUID()); - DoCast(Infernal, SPELL_INFERNAL_RELAY); + infernals.push_back(infernal->GetGUID()); + DoCast(infernal, SPELL_INFERNAL_RELAY); } Talk(SAY_SUMMON); diff --git a/src/server/scripts/Kalimdor/zone_desolace.cpp b/src/server/scripts/Kalimdor/zone_desolace.cpp index 882bc176932..05496c0fcda 100644 --- a/src/server/scripts/Kalimdor/zone_desolace.cpp +++ b/src/server/scripts/Kalimdor/zone_desolace.cpp @@ -161,9 +161,9 @@ public: { if (quest->GetQuestId() == QUEST_RETURN_TO_VAHLARRIEL) { - if (npc_escortAI* pEscortAI = CAST_AI(npc_dalinda::npc_dalindaAI, creature->AI())) + if (npc_escortAI* escortAI = CAST_AI(npc_dalinda::npc_dalindaAI, creature->AI())) { - pEscortAI->Start(true, false, player->GetGUID()); + escortAI->Start(true, false, player->GetGUID()); creature->setFaction(113); } } @@ -186,7 +186,7 @@ public: switch (waypointId) { case 1: - me->IsStandState(); + me->SetStandState(UNIT_STAND_STATE_STAND); break; case 15: if (player) diff --git a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp index a9f92521ef8..f438a117a5f 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/ObsidianSanctum/boss_sartharion.cpp @@ -1001,6 +1001,8 @@ public: void Reset() OVERRIDE { + dummy_dragonAI::Reset(); + m_uiShadowBreathTimer = 20000; m_uiShadowFissureTimer = 5000; m_uiHatchEggTimer = 30000; @@ -1090,6 +1092,8 @@ public: void Reset() OVERRIDE { + dummy_dragonAI::Reset(); + m_uiShadowBreathTimer = 20000; m_uiShadowFissureTimer = 5000; m_uiAcolyteShadronTimer = 60000; @@ -1194,6 +1198,8 @@ public: void Reset() OVERRIDE { + dummy_dragonAI::Reset(); + m_uiShadowBreathTimer = 20000; m_uiShadowFissureTimer = 5000; m_uiAcolyteVesperonTimer = 60000; diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp index 13c9bbd722c..0d2a424b4c7 100644 --- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp +++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp @@ -836,8 +836,6 @@ class npc_halion_controller : public CreatureScript _twilightDamageTaken = 0; return; } - default: - break; } _materialDamageTaken = 0; diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp index 4ece79b0f7f..bbb3d666b32 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_skarvald_dalronn.cpp @@ -112,6 +112,7 @@ public: Charge_Timer = 5000; StoneStrike_Timer = 10000; Dalronn_isDead = false; + Response_Timer = 0; Check_Timer = 5000; Enraged = false; @@ -280,6 +281,7 @@ public: Summon_Timer = 10000; Check_Timer = 5000; Skarvald_isDead = false; + Response_Timer = 0; AggroYell_Timer = 0; ghost = me->GetEntry() == NPC_DALRONN_GHOST; diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp index a54a1b6bec7..f592a4b2bb2 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp @@ -159,6 +159,7 @@ public: void Reset() OVERRIDE { + m_bIsWalking = false; m_bIsPause = false; m_bIsActiveWithBJORN = false; m_bIsActiveWithHALDOR = false; diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index 4dedc774bb8..279a846140c 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -478,6 +478,7 @@ public: { instance = creature->GetInstanceScript(); DoCast(me, SPELL_DUAL_WIELD, true); + AkamaGUID = 0; } void Reset() OVERRIDE; @@ -1081,7 +1082,7 @@ public: { case EVENT_SHADOW_BLAST: me->GetMotionMaster()->Clear(false); - if (!me->IsWithinDistInMap(me->GetVictim(), 50)||!me->IsWithinLOSInMap(me->GetVictim())) + if (me->GetVictim() && (!me->IsWithinDistInMap(me->GetVictim(), 50) || !me->IsWithinLOSInMap(me->GetVictim()))) me->GetMotionMaster()->MoveChase(me->GetVictim(), 30); else me->GetMotionMaster()->MoveIdle(); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp index 4499cb98475..ff66dcb550c 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp @@ -151,6 +151,8 @@ public: Intro = false; JustCreated = true; creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); // set it only once on Creature create (no need do intro if wiped) + for (uint8 i = 0; i < 4; ++i) + ShieldGeneratorChannel[i] = 0; } InstanceScript* instance; @@ -201,17 +203,20 @@ public: JustCreated = false; } else CanAttack = true; - for (uint8 i = 0; i < 4; ++i) - if (Unit* remo = Unit::GetUnit(*me, ShieldGeneratorChannel[i])) - remo->setDeathState(JUST_DIED); + { + if (ShieldGeneratorChannel[i]) + { + if (Unit* remo = Unit::GetUnit(*me, ShieldGeneratorChannel[i])) + { + remo->setDeathState(JUST_DIED); + ShieldGeneratorChannel[i] = 0; + } + } + } if (instance) instance->SetData(DATA_LADYVASHJEVENT, NOT_STARTED); - ShieldGeneratorChannel[0] = 0; - ShieldGeneratorChannel[1] = 0; - ShieldGeneratorChannel[2] = 0; - ShieldGeneratorChannel[3] = 0; me->SetCorpseDelay(1000*60*60); } diff --git a/src/server/shared/Threading/Threading.cpp b/src/server/shared/Threading/Threading.cpp index 34a7bf8bb9d..1ed29d5106a 100644 --- a/src/server/shared/Threading/Threading.cpp +++ b/src/server/shared/Threading/Threading.cpp @@ -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) diff --git a/src/tools/mmaps_generator/MapBuilder.cpp b/src/tools/mmaps_generator/MapBuilder.cpp index a8254eb5eaf..ab584e27e03 100644 --- a/src/tools/mmaps_generator/MapBuilder.cpp +++ b/src/tools/mmaps_generator/MapBuilder.cpp @@ -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); |
