--HG--
branch : trunk
This commit is contained in:
XTZGZoReX
2009-03-20 15:17:58 +01:00
55 changed files with 2021 additions and 1128 deletions
+6 -6
View File
@@ -22,7 +22,7 @@
DROP TABLE IF EXISTS `db_version`;
CREATE TABLE `db_version` (
`version` varchar(120) default NULL,
`required_7472_01_mangos_mangos_string` bit(1) default NULL
`required_7495_01_mangos_mangos_string` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
--
@@ -300,8 +300,8 @@ INSERT INTO `command` VALUES
('gobject add',2,'Syntax: .gobject add #id <spawntimeSecs>\r\n\r\nAdd a game object from game object templates to the world at your current location using the #id.\r\nspawntimesecs sets the spawntime, it is optional.\r\n\r\nNote: this is a copy of .gameobject.'),
('gobject delete',2,'Syntax: .gobject delete #go_guid\r\nDelete gameobject with guid #go_guid.'),
('gobject move',2,'Syntax: .gobject move #goguid [#x #y #z]\r\n\r\nMove gameobject #goguid to character coordinates (or to (#x,#y,#z) coordinates if its provide).'),
('gobject near',3,'Syntax: .gobject near [#distance]\r\n\r\nOutput gameobjects at distance #distance from player. Output gameobject guids and coordinates sorted by distance from character. If #distance not provided use 10 as default value.'),
('gobject phase',3,'Syntax: .gobject phase #guid #phasemask\r\n\r\nGameobject with DB guid #guid phasemask changed to #phasemask with related world vision update for players. Gameobject state saved to DB and persistent.'),
('gobject near',2,'Syntax: .gobject near [#distance]\r\n\r\nOutput gameobjects at distance #distance from player. Output gameobject guids and coordinates sorted by distance from character. If #distance not provided use 10 as default value.'),
('gobject setphase',2,'Syntax: .gobject setphase #guid #phasemask\r\n\r\nGameobject with DB guid #guid phasemask changed to #phasemask with related world vision update for players. Gameobject state saved to DB and persistent.'),
('gobject turn',2,'Syntax: .gobject turn #goguid \r\n\r\nSet for gameobject #goguid orientation same as current character orientation.'),
('gobject target',2,'Syntax: .gobject target [#go_id|#go_name_part]\r\n\r\nLocate and show position nearest gameobject. If #go_id or #go_name_part provide then locate and show position of nearest gameobject with gameobject template id #go_id or name included #go_name_part as part.'),
('goname',1,'Syntax: .goname $charactername\r\n\r\nTeleport to the given character. Either specify the character name or click on the character\'s portrait, e.g. when you are in a group.'),
@@ -2487,8 +2487,8 @@ INSERT INTO `mangos_string` VALUES
(273,'Game Object (GUID: %u) not found',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(274,'Game Object (GUID: %u) has references in not found creature %u GO list, can\'t be deleted.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(275,'Game Object (GUID: %u) removed',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(276,'Game Object (GUID: %u) turned',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(277,'Game Object (GUID: %u) moved',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(276,'Game Object |cffffffff|Hgameobject:%d|h[%s]|h|r (GUID: %u) turned',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(277,'Game Object |cffffffff|Hgameobject:%d|h[%s]|h|r (GUID: %u) moved',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(278,'You must select a vendor',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(279,'You must send id for item',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(280,'Vendor has too many items (max 128)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
@@ -2680,7 +2680,7 @@ INSERT INTO `mangos_string` VALUES
(521,'%d - |cffffffff|Hskill:%d|h[%s %s]|h|r %s %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(522,'Game Object (GUID: %u) not found',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(523,'>> Game Object %s (GUID: %u) at %f %f %f. Orientation %f.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(524,'Selected object:\n|cffffffff|Hitemset:%d|h[%s]|h|r\nGUID: %u ID: %u\nX: %f Y: %f Z: %f MapId: %u\nOrientation: %f',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(524,'Selected object:\n|cffffffff|Hgameobject:%d|h[%s]|h|r GUID: %u ID: %u\nX: %f Y: %f Z: %f MapId: %u\nOrientation: %f',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(525,'>> Add Game Object \'%i\' (%s) (GUID: %i) added at \'%f %f %f\'.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(526,'%s (lowguid: %u) movement generators stack:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(527,' Idle',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
@@ -1,7 +1,7 @@
ALTER TABLE db_version CHANGE COLUMN required_7439_01_mangos_mangos_string required_7472_01_mangos_mangos_string bit;
/*ALTER TABLE db_version CHANGE COLUMN required_7439_01_mangos_mangos_string required_7472_01_mangos_mangos_string bit;*/
DELETE FROM mangos_string WHERE entry >= 667 and entry <= 687 or entry = 614 or entry = 615;
INSERT INTO mangos_string VALUES
DELETE FROM trinity_string WHERE entry >= 667 and entry <= 687 or entry = 614 or entry = 615;
INSERT INTO trinity_string VALUES
(614,'The Alliance flag is now placed at its base.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(615,'The Horde flag is now placed at its base.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(667,'The Alliance has taken control of the Mage Tower!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
+6
View File
@@ -0,0 +1,6 @@
DELETE FROM `spell_proc_event` WHERE `entry` IN (30293, 30295, 30296);
INSERT INTO `spell_proc_event` VALUES
-- Soul Leech
(30293, 0x00, 5, 0x00000381, 0x200C0, 0x00000000, 0x0000000, 0x0000000, 0.000000, 0.000000, 0),
(30295, 0x00, 5, 0x00000381, 0x200C0, 0x00000000, 0x0000000, 0x0000000, 0.000000, 0.000000, 0),
(30296, 0x00, 5, 0x00000381, 0x200C0, 0x00000000, 0x0000000, 0x0000000, 0.000000, 0.000000, 0);
@@ -0,0 +1,7 @@
/*ALTER TABLE db_version CHANGE COLUMN required_7472_01_mangos_mangos_string required_7493_01_mangos_command bit;*/
DELETE FROM `command` WHERE `name` IN ('gobject near','gobject phase','gobject setphase');
INSERT INTO `command` VALUES
('gobject near',2,'Syntax: .gobject near [#distance]\r\n\r\nOutput gameobjects at distance #distance from player. Output gameobject guids and coordinates sorted by distance from character. If #distance not provided use 10 as default value.'),
('gobject setphase',2,'Syntax: .gobject setphase #guid #phasemask\r\n\r\nGameobject with DB guid #guid phasemask changed to #phasemask with related world vision update for players. Gameobject state saved to DB and persistent.');
@@ -0,0 +1,7 @@
/*ALTER TABLE db_version CHANGE COLUMN required_7493_01_mangos_command required_7495_01_mangos_mangos_string bit;*/
DELETE FROM `trinity_string` WHERE `entry` IN (276,277,524);
INSERT INTO `trinity_string` VALUES
(276,'Game Object |cffffffff|Hgameobject:%d|h[%s]|h|r (GUID: %u) turned',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(277,'Game Object |cffffffff|Hgameobject:%d|h[%s]|h|r (GUID: %u) moved',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(524,'Selected object:\n|cffffffff|Hgameobject:%d|h[%s]|h|r GUID: %u ID: %u\nX: %f Y: %f Z: %f MapId: %u\nOrientation: %f',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+4
View File
@@ -86,5 +86,9 @@ INSTALL(FILES
1927_world.sql
1939_word.sql
1957_word.sql
1962_mangos_7472_01_world_trinity_string.sql
2013_world.sql
2021_world.sql
2025_mangos_7493_01_world_command.sql
2025_mangos_7495_01_world_trinity_string.sql
DESTINATION share/trinity/sql/updates)
+57 -10
View File
@@ -1875,7 +1875,6 @@
RelativePath="..\scripts\zone\caverns_of_time\dark_portal\instance_dark_portal.cpp"
>
</File>
</Filter>
<Filter
Name="Battle for Mt. Hyjal"
@@ -1936,9 +1935,6 @@
>
</File>
</Filter>
<Filter
Name="Culling of Stratholme">
</Filter>
</Filter>
<Filter
Name="Silvermoon City"
@@ -2008,12 +2004,63 @@
</Filter>
<Filter
Name="Azjol-Nerub">
<Filter
Name="Ahn&apos;kahet">
</Filter>
<Filter
Name="Azjol-Nerub">
</Filter>
<Filter
Name="Ahn&apos;kahet"
>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Ahn&apos;kahet\boss_amanitar.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Ahn&apos;kahet\boss_elder_nadox.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Ahn&apos;kahet\boss_herald_volazj.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Ahn&apos;kahet\boss_jedoga_shadowseeker.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Ahn&apos;kahet\boss_prince_taldaram.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Ahn&apos;kahet\def_ahnkahet.h"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Ahn&apos;kahet\instance_ahnkahet.cpp"
>
</File>
</Filter>
<Filter
Name="Azjol-Nerub"
>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_anubarak.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_hadronox.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_krikthir_the_gatewatcher.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\def_azjol_nerub.h"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\instance_azjol_nerub.cpp"
>
</File>
</Filter>
</Filter>
<Filter
Name="Drak&apos;Tharon Keep">
+57 -9
View File
@@ -1114,12 +1114,63 @@
</Filter>
<Filter
Name="Azjol-Nerub">
<Filter
Name="Ahn&apos;kahet">
</Filter>
<Filter
Name="Azjol-Nerub">
</Filter>
<Filter
Name="Ahn&apos;kahet"
>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Ahn&apos;kahet\boss_amanitar.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Ahn&apos;kahet\boss_elder_nadox.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Ahn&apos;kahet\boss_herald_volazj.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Ahn&apos;kahet\boss_jedoga_shadowseeker.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Ahn&apos;kahet\boss_prince_taldaram.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Ahn&apos;kahet\def_ahnkahet.h"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Ahn&apos;kahet\instance_ahnkahet.cpp"
>
</File>
</Filter>
<Filter
Name="Azjol-Nerub"
>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_anubarak.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_hadronox.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_krikthir_the_gatewatcher.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\def_azjol_nerub.h"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\instance_azjol_nerub.cpp"
>
</File>
</Filter>
</Filter>
<Filter
Name="Drak&apos;Tharon Keep">
@@ -2194,9 +2245,6 @@
>
</File>
</Filter>
<Filter
Name="Culling of Stratholme">
</Filter>
<Filter
Name="Culling of Stratholme"
>
+48 -4
View File
@@ -807,10 +807,58 @@
<Filter
Name="Ahn&apos;kahet"
>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Ahn&apos;kahet\boss_amanitar.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Ahn&apos;kahet\boss_elder_nadox.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Ahn&apos;kahet\boss_herald_volazj.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Ahn&apos;kahet\boss_jedoga_shadowseeker.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Ahn&apos;kahet\boss_prince_taldaram.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Ahn&apos;kahet\def_ahnkahet.h"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Ahn&apos;kahet\instance_ahnkahet.cpp"
>
</File>
</Filter>
<Filter
Name="Azjol-Nerub"
>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_anubarak.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_hadronox.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\boss_krikthir_the_gatewatcher.cpp"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\def_azjol_nerub.h"
>
</File>
<File
RelativePath="..\scripts\zone\Azjol-Nerub\Azjol-Nerub\instance_azjol_nerub.cpp"
>
</File>
</Filter>
</Filter>
<Filter
@@ -2224,10 +2272,6 @@
Name="Culling of Stratholme"
>
</Filter>
<Filter
Name="Culling of Stratholme"
>
</Filter>
<Filter
Name="Old Hillsbrad"
>
@@ -12,6 +12,7 @@
#include "GridNotifiersImpl.h"
#include "Unit.h"
#include "GameObject.h"
#include "TemporarySummon.h"
#include "sc_creature.h"
#include "sc_gossip.h"
#include "sc_instance.h"
@@ -0,0 +1,27 @@
/*
* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: boss_amanitar
SD%Complete: 0
SDComment: Placeholder
SDCategory: Ahn'kahet
EndScriptData */
#include "precompiled.h"
#include "def_ahnkahet.h"
@@ -0,0 +1,40 @@
/*
* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: boss_elder_nadox
SD%Complete: 0
SDComment: Placeholder
SDCategory: Ahn'kahet
EndScriptData */
#include "precompiled.h"
#include "def_ahnkahet.h"
#define SPELL_BROOD_PLAGUE 56130
#define H_SPELL_BROOD_PLAGUE 59467
#define SPELL_BROOD_RAGE 59465
#define MOB_AHNKAHAR_SWARMER 30178
#define SPELL_SUMMON_SWARMERS 56119//2x 30178
#define MOB_AHNKAHAR_SWARMER 30178
#define SPELL_SUMMON_SWARM_GUARD 56120//1x 30176
#define SPELL_DEADLY_POISON 56145// Proc trigger
#define H_SPELL_DEADLY_POISON 59479// Proc trigger
#define SPELL_GUARDIAN_AURA 56151
@@ -0,0 +1,27 @@
/*
* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: boss_herald_volazj
SD%Complete: 0
SDComment: Placeholder
SDCategory: Ahn'kahet
EndScriptData */
#include "precompiled.h"
#include "def_ahnkahet.h"
@@ -0,0 +1,36 @@
/*
* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: boss_jedoga_shadowseeker
SD%Complete: 0
SDComment: Placeholder
SDCategory: Ahn'kahet
EndScriptData */
#include "precompiled.h"
#include "def_ahnkahet.h"
#define SPELL_CYCLONE_STRIKE 56855
#define H_SPELL_CYCLONE_STRIKE 60030//kein unterschied zu 56855 außer das 60030 1,5sec cast ist
#define SPELL_LIGHTNING_BOLT 56891
#define H_SPELL_LIGHTNING_BOLT 60032
#define SPELL_THUNDERSHOCK 56926//AOE works
#define H_SPELL_THUNDERSHOCK 60029//AOE works
#define SPELL_GIFT_OF_THE_HERALD 56219//triggert if sucessfull sacreficed
@@ -0,0 +1,44 @@
/*
* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: boss_prince_taldaram
SD%Complete: 0
SDComment: Placeholder
SDCategory: Ahn'kahet
EndScriptData */
#include "precompiled.h"
#include "def_ahnkahet.h"
#define SPELL_BLOODTHIRST 55968 //Trigger Spell + add aura
#define SPELL_CONJURE_FLAME_SPHERE 55931
#define SPELL_FLAME_SPHERE_SUMMON_1 55895// 1x 30106
#define H_SPELL_FLAME_SPHERE_SUMMON_1 59511// 1x 31686
#define H_SPELL_FLAME_SPHERE_SUMMON_2 59512// 1x 31687
#define SPELL_FLAME_SPHERE_SPAWN_EFFEKT 55891
#define SPELL_FLAME_SPHERE_VISUAL 55928
#define SPELL_FLAME_SPHERE_PERIODIC 55926
#define H_SPELL_FLAME_SPHERE_PERIODIC 59508
#define SPELL_FLAME_SPHERE_DEATH_EFFEKT 55947
#define SPELL_EMBRACE_OF_THE_VAMPYR 55959
#define H_SPELL_EMBRACE_OF_THE_VAMPYR 59513
#define SPELL_VANISH 55964
@@ -0,0 +1,33 @@
/*
* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef DEF_AHNKAHET_H
#define DEF_AHNKAHET_H
#define DATA_ELDER_NADOX 1
#define DATA_PRINCE_TALDARAM 2
#define DATA_JEDOGA_SHADOWSEEKER 3
#define DATA_HERALD_VOLAZJ 4
#define DATA_AMANITAR 5
#define DATA_ELDER_NADOX_EVENT 6
#define DATA_PRINCE_TALDARAM_EVENT 7
#define DATA_JEDOGA_SHADOWSEEKER_EVENT 8
#define DATA_HERALD_VOLAZJ_EVENT 9
#define DATA_AMANITAR_EVENT 10
#endif
@@ -0,0 +1,194 @@
/*
* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: Instance_Azjol_Nerub
SD%Complete: 0
SDComment: Placeholder
SDCategory: Azjol Nerub
EndScriptData */
#include "precompiled.h"
#include "def_ahnkahet.h"
#define ENCOUNTERS 5
/* Ahn'kahet encounters:
0 - Elder Nadox
1 - Prince Taldaram
2 - Jedoga Shadowseeker
3 - Herald Volazj
4 - Amanitar (Heroic only)
*/
struct TRINITY_DLL_DECL instance_ahnkahet : public ScriptedInstance
{
instance_ahnkahet(Map *Map) : ScriptedInstance(Map) {Initialize();};
uint64 Elder_Nadox;
uint64 Prince_Taldaram;
uint64 Jedoga_Shadowseeker;
uint64 Herald_Volazj;
uint64 Amanitar;
uint32 Encounters[ENCOUNTERS];
void Initialize()
{
Elder_Nadox =0;
Prince_Taldaram =0;
Jedoga_Shadowseeker =0;
Herald_Volazj =0;
Amanitar =0;
for(uint8 i = 0; i < ENCOUNTERS; ++i)
Encounters[i] = NOT_STARTED;
}
bool IsEncounterInProgress() const
{
for(uint8 i = 0; i < ENCOUNTERS; ++i)
if(Encounters[i] == IN_PROGRESS) return true;
return false;
}
void OnCreatureCreate(Creature *creature, uint32 creature_entry)
{
switch(creature_entry)
{
case 29309: Elder_Nadox = creature->GetGUID(); break;
case 29308: Prince_Taldaram = creature->GetGUID(); break;
case 29310: Jedoga_Shadowseeker = creature->GetGUID(); break;
case 29311: Herald_Volazj = creature->GetGUID(); break;
case 30258: Amanitar = creature->GetGUID(); break;
}
}
uint64 GetData64(uint32 identifier)
{
switch(identifier)
{
case DATA_ELDER_NADOX: return Elder_Nadox;
case DATA_PRINCE_TALDARAM: return Prince_Taldaram;
case DATA_JEDOGA_SHADOWSEEKER: return Jedoga_Shadowseeker;
case DATA_HERALD_VOLAZJ: return Herald_Volazj;
case DATA_AMANITAR: return Amanitar;
}
return 0;
}
void SetData(uint32 type, uint32 data)
{
switch(type)
{
case DATA_ELDER_NADOX_EVENT:
Encounters[0] = data;break;
case DATA_PRINCE_TALDARAM_EVENT:
Encounters[1] = data; break;
case DATA_JEDOGA_SHADOWSEEKER_EVENT:
Encounters[2] = data; break;
case DATA_HERALD_VOLAZJ:
Encounters[3] = data; break;
case DATA_AMANITAR:
Encounters[4] = data; break;
}
if (data == DONE)
{
SaveToDB();
}
}
uint32 GetData(uint32 type)
{
switch(type)
{
case DATA_ELDER_NADOX_EVENT: return Encounters[0];
case DATA_PRINCE_TALDARAM_EVENT: return Encounters[1];
case DATA_JEDOGA_SHADOWSEEKER_EVENT: return Encounters[2];
case DATA_HERALD_VOLAZJ: return Encounters[3];
case DATA_AMANITAR: return Encounters[4];
}
return 0;
}
const char* Save()
{
OUT_SAVE_INST_DATA;
std::string str_data;
std::ostringstream saveStream;
saveStream << "A K " << Encounters[0] << " " << Encounters[1] << " "
<< Encounters[2] << Encounters[3] << Encounters[4];
str_data = saveStream.str();
OUT_SAVE_INST_DATA_COMPLETE;
return str_data.c_str();
}
void Load(const char* in)
{
if (!in)
{
OUT_LOAD_INST_DATA_FAIL;
return;
}
OUT_LOAD_INST_DATA(in);
char dataHead1, dataHead2;
uint16 data0,data1,data2,data3,data4;
std::istringstream loadStream(in);
loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2 >> data3 >> data4;
if( dataHead1 == 'A' && dataHead2 == 'K')
{
Encounters[0] = data0;
Encounters[1] = data1;
Encounters[2] = data2;
Encounters[3] = data3;
Encounters[4] = data4;
for(uint8 i = 0; i < ENCOUNTERS; ++i)
if (Encounters[i] == IN_PROGRESS)
Encounters[i] = NOT_STARTED;
}else OUT_LOAD_INST_DATA_FAIL;
OUT_LOAD_INST_DATA_COMPLETE;
}
};
InstanceData* GetInstanceData_instance_ahnkahet(Map* map)
{
return new instance_ahnkahet(map);
}
void AddSC_instance_ahnkahet()
{
Script *newscript;
newscript = new Script;
newscript->Name = "instance_ahnkahet";
newscript->GetInstanceData = &GetInstanceData_instance_ahnkahet;
newscript->RegisterSelf();
}
@@ -0,0 +1,27 @@
/*
* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: boss_anubarak
SD%Complete: 0
SDComment: Placeholder
SDCategory: Azjol Nerub
EndScriptData */
#include "precompiled.h"
#include "def_azjol_nerub.h"
@@ -0,0 +1,38 @@
/*
* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: boss_hadronox
SD%Complete: 0
SDComment: Placeholder
SDCategory: Azjol Nerub
EndScriptData */
#include "precompiled.h"
#include "def_azjol_nerub.h"
#define SPELL_WEB_FRONT_DOORS 53177//dummy
#define SPELL_ACID_CLOUD 53400
#define H_SPELL_ACID_CLOUD 59419
#define SPELL_LEECH_POISON 53030
#define H_SPELL_LEECH_POISON 59417
#define SPELL_LEECH_POISON_DEADTRIGGER 53800//heal 10% heroic und normal
#define SPELL_PIECE_ARMOR 53418
#define SPELL_WEB_GRAB 53406
#define H_SPELL_WEB_GRAB 59420
@@ -0,0 +1,38 @@
/*
* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: boss_krikthir_the_gatewatcher
SD%Complete: 0
SDComment: Placeholder
SDCategory: Azjol Nerub
EndScriptData */
#include "precompiled.h"
#include "def_azjol_nerub.h"
#define SPELL_MIND_FLAY 52586
#define H_SPELL_MIND_FLAY 59367
#define SPELL_CURSE_OF_FATIGUE 52592
#define H_SPELL_CURSE_OF_FATIGUE 59368
#define SPELL_FRENZY 28747
#define MOB_SKITTERING_SWARMER 28735
#define MOB_SKITTERING_SWARMER_CONTROLLER 32593
#define SPELL_SUMMON_SKITTERING_SWARMER 52438//AOE Effekt 140
#define SPELL_SUMMON_SKITTERING_SWARMER 52439//Summon 3x 28735
@@ -0,0 +1,29 @@
/*
* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef DEF_AZJOL_NERUB_H
#define DEF_AZJOL_NERUB_H
#define DATA_KRIKTHIR_THE_GATEWATCHER 1
#define DATA_HADRONOX 2
#define DATA_ANUBARAK 3
#define DATA_KRIKTHIR_THE_GATEWATCHER_EVENT 4
#define DATA_HADRONOX_EVENT 5
#define DATA_ANUBARAK_EVENT 6
#endif
@@ -0,0 +1,180 @@
/*
* Copyright (C) 2009 Trinity <http://www.trinitycore.org/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/* ScriptData
SDName: Instance_Azjol_Nerub
SD%Complete: 0
SDComment: Placeholder
SDCategory: Azjol Nerub
EndScriptData */
#include "precompiled.h"
#include "def_azjol_nerub.h"
#define ENCOUNTERS 3
/* Azjol Nerub encounters:
0 - Krik'thir the Gatewatcher
1 - Hadronox
2 - Anub'arak
*/
struct TRINITY_DLL_DECL instance_azjol_nerub : public ScriptedInstance
{
instance_azjol_nerub(Map *Map) : ScriptedInstance(Map) {Initialize();};
uint64 Krikthir;
uint64 Hadronox;
uint64 Anubarak;
uint32 Encounters[ENCOUNTERS];
void Initialize()
{
Krikthir = 0;
Hadronox = 0;
Anubarak =0;
for(uint8 i = 0; i < ENCOUNTERS; ++i)
Encounters[i] = NOT_STARTED;
}
bool IsEncounterInProgress() const
{
for(uint8 i = 0; i < ENCOUNTERS; ++i)
if(Encounters[i] == IN_PROGRESS) return true;
return false;
}
void OnCreatureCreate(Creature *creature, uint32 creature_entry)
{
switch(creature_entry)
{
case 28684: Krikthir = creature->GetGUID(); break;
case 28921: Hadronox = creature->GetGUID(); break;
case 29120: Anubarak = creature->GetGUID(); break;
}
}
uint64 GetData64(uint32 identifier)
{
switch(identifier)
{
case DATA_KRIKTHIR_THE_GATEWATCHER: return Krikthir;
case DATA_HADRONOX: return Hadronox;
case DATA_ANUBARAK: return Anubarak;
}
return 0;
}
void SetData(uint32 type, uint32 data)
{
switch(type)
{
case DATA_KRIKTHIR_THE_GATEWATCHER_EVENT:
Encounters[0] = data;break;
case DATA_HADRONOX_EVENT:
Encounters[1] = data; break;
case DATA_ANUBARAK_EVENT:
Encounters[2] = data; break;
}
if (data == DONE)
{
SaveToDB();
}
}
uint32 GetData(uint32 type)
{
switch(type)
{
case DATA_KRIKTHIR_THE_GATEWATCHER_EVENT: return Encounters[0];
case DATA_HADRONOX_EVENT: return Encounters[1];
case DATA_ANUBARAK_EVENT: return Encounters[2];
}
return 0;
}
const char* Save()
{
OUT_SAVE_INST_DATA;
std::string str_data;
std::ostringstream saveStream;
saveStream << "A N " << Encounters[0] << " " << Encounters[1] << " "
<< Encounters[2];
str_data = saveStream.str();
OUT_SAVE_INST_DATA_COMPLETE;
return str_data.c_str();
}
void Load(const char* in)
{
if (!in)
{
OUT_LOAD_INST_DATA_FAIL;
return;
}
OUT_LOAD_INST_DATA(in);
char dataHead1, dataHead2;
uint16 data0,data1,data2;
std::istringstream loadStream(in);
loadStream >> dataHead1 >> dataHead2 >> data0 >> data1 >> data2;
if( dataHead1 == 'A' && dataHead2 == 'N')
{
Encounters[0] = data0;
Encounters[1] = data1;
Encounters[2] = data2;
for(uint8 i = 0; i < ENCOUNTERS; ++i)
if (Encounters[i] == IN_PROGRESS)
Encounters[i] = NOT_STARTED;
}else OUT_LOAD_INST_DATA_FAIL;
OUT_LOAD_INST_DATA_COMPLETE;
}
};
InstanceData* GetInstanceData_instance_azjol_nerub(Map* map)
{
return new instance_azjol_nerub(map);
}
void AddSC_instance_azjol_nerub()
{
Script *newscript;
newscript = new Script;
newscript->Name = "instance_azjol_nerub";
newscript->GetInstanceData = &GetInstanceData_instance_azjol_nerub;
newscript->RegisterSelf();
}
+272 -280
View File
@@ -74,53 +74,199 @@ ChatCommand * ChatHandler::getCommandTable()
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand serverSetCommandTable[] =
static ChatCommand banCommandTable[] =
{
{ "loglevel", SEC_CONSOLE, true, &ChatHandler::HandleServerSetLogLevelCommand, "", NULL },
{ "difftime", SEC_CONSOLE, true, &ChatHandler::HandleServerSetDiffTimeCommand, "", NULL },
{ "motd", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerSetMotdCommand, "", NULL },
{ "account", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanAccountCommand, "", NULL },
{ "character", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanCharacterCommand, "", NULL },
{ "ip", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanIPCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand serverIdleRestartCommandTable[] =
static ChatCommand baninfoCommandTable[] =
{
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerIdleRestartCommand, "", NULL },
{ "account", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanInfoAccountCommand, "", NULL },
{ "character", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanInfoCharacterCommand, "", NULL },
{ "ip", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanInfoIPCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand serverIdleShutdownCommandTable[] =
static ChatCommand banlistCommandTable[] =
{
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerIdleShutDownCommand, "", NULL },
{ "account", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanListAccountCommand, "", NULL },
{ "character", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanListCharacterCommand, "", NULL },
{ "ip", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanListIPCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand serverRestartCommandTable[] =
static ChatCommand castCommandTable[] =
{
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerRestartCommand, "", NULL },
{ "back", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastBackCommand, "", NULL },
{ "dist", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastDistCommand, "", NULL },
{ "self", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastSelfCommand, "", NULL },
{ "target", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastTargetCommand, "", NULL },
{ "", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand serverShutdownCommandTable[] =
static ChatCommand debugCommandTable[] =
{
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCommand, "", NULL },
{ "inarc", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugInArcCommand, "", NULL },
{ "spellfail", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSpellFailCommand, "", NULL },
{ "setpoi", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSetPoiCommand, "", NULL },
{ "qpartymsg", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendQuestPartyMsgCommand, "", NULL },
{ "qinvalidmsg", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendQuestInvalidMsgCommand, "", NULL },
{ "equiperr", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugEquipErrorCommand, "", NULL },
{ "sellerr", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSellErrorCommand, "", NULL },
{ "buyerr", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugBuyErrorCommand, "", NULL },
{ "sendopcode", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendOpcodeCommand, "", NULL },
{ "spawnvehicle", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSpawnVehicle, "", NULL },
{ "uws", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugUpdateWorldStateCommand, "", NULL },
{ "ps", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugPlaySound2Command, "", NULL },
{ "scn", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendChannelNotifyCommand, "", NULL },
{ "scm", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendChatMsgCommand, "", NULL },
{ "sps", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendSetPhaseShiftCommand, "", NULL },
{ "getitemstate", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugGetItemState, "", NULL },
{ "playsound", SEC_MODERATOR, false, &ChatHandler::HandleDebugPlaySoundCommand, "", NULL },
{ "update", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugUpdate, "", NULL },
{ "setvalue", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSetValue, "", NULL },
{ "getvalue", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugGetValue, "", NULL },
{ "setbit", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSet32Bit, "", NULL },
{ "Mod32Value", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugMod32Value, "", NULL },
{ "anim", SEC_GAMEMASTER, false, &ChatHandler::HandleDebugAnimCommand, "", NULL },
{ "lootrecipient", SEC_GAMEMASTER, false, &ChatHandler::HandleDebugGetLootRecipient, "", NULL },
{ "arena", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugArenaCommand, "", NULL },
{ "bg", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugBattlegroundCommand, "", NULL },
{ "sendlargepacket",SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSendLargePacketCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand eventCommandTable[] =
{
{ "activelist", SEC_GAMEMASTER, true, &ChatHandler::HandleEventActiveListCommand, "", NULL },
{ "start", SEC_GAMEMASTER, true, &ChatHandler::HandleEventStartCommand, "", NULL },
{ "stop", SEC_GAMEMASTER, true, &ChatHandler::HandleEventStopCommand, "", NULL },
{ "", SEC_GAMEMASTER, true, &ChatHandler::HandleEventInfoCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand serverCommandTable[] =
static ChatCommand gmCommandTable[] =
{
{ "corpses", SEC_GAMEMASTER, true, &ChatHandler::HandleServerCorpsesCommand, "", NULL },
{ "exit", SEC_CONSOLE, true, &ChatHandler::HandleServerExitCommand, "", NULL },
{ "idlerestart", SEC_ADMINISTRATOR, true, NULL, "", serverIdleRestartCommandTable },
{ "idleshutdown", SEC_ADMINISTRATOR, true, NULL, "", serverShutdownCommandTable },
{ "info", SEC_PLAYER, true, &ChatHandler::HandleServerInfoCommand, "", NULL },
{ "motd", SEC_PLAYER, true, &ChatHandler::HandleServerMotdCommand, "", NULL },
{ "restart", SEC_ADMINISTRATOR, true, NULL, "", serverRestartCommandTable },
{ "shutdown", SEC_ADMINISTRATOR, true, NULL, "", serverShutdownCommandTable },
{ "set", SEC_ADMINISTRATOR, true, NULL, "", serverSetCommandTable },
{ "chat", SEC_MODERATOR, false, &ChatHandler::HandleGMChatCommand, "", NULL },
{ "ingame", SEC_PLAYER, true, &ChatHandler::HandleGMListIngameCommand, "", NULL },
{ "list", SEC_ADMINISTRATOR, true, &ChatHandler::HandleGMListFullCommand, "", NULL },
{ "visible", SEC_MODERATOR, false, &ChatHandler::HandleGMVisibleCommand, "", NULL },
{ "fly", SEC_ADMINISTRATOR, false, &ChatHandler::HandleGMFlyModeCommand, "", NULL },
{ "", SEC_MODERATOR, false, &ChatHandler::HandleGMmodeCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand goCommandTable[] =
{
{ "grid", SEC_MODERATOR, false, &ChatHandler::HandleGoGridCommand, "", NULL },
{ "creature", SEC_GAMEMASTER, false, &ChatHandler::HandleGoCreatureCommand, "", NULL },
{ "object", SEC_GAMEMASTER, false, &ChatHandler::HandleGoObjectCommand, "", NULL },
{ "trigger", SEC_GAMEMASTER, false, &ChatHandler::HandleGoTriggerCommand, "", NULL },
{ "graveyard", SEC_GAMEMASTER, false, &ChatHandler::HandleGoGraveyardCommand, "", NULL },
{ "zonexy", SEC_MODERATOR, false, &ChatHandler::HandleGoZoneXYCommand, "", NULL },
{ "xy", SEC_MODERATOR, false, &ChatHandler::HandleGoXYCommand, "", NULL },
{ "xyz", SEC_MODERATOR, false, &ChatHandler::HandleGoXYZCommand, "", NULL },
{ "", SEC_MODERATOR, false, &ChatHandler::HandleGoXYZCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand gobjectCommandTable[] =
{
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectAddCommand, "", NULL },
{ "delete", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectDeleteCommand, "", NULL },
{ "move", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectMoveCommand, "", NULL },
{ "near", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectNearCommand, "", NULL },
{ "setphase", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectPhaseCommand, "", NULL },
{ "target", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectTargetCommand, "", NULL },
{ "turn", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectTurnCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand groupCommandTable[] =
{
{ "leader", SEC_ADMINISTRATOR, false, &ChatHandler::HandleGroupLeaderCommand, "", NULL },
{ "disband", SEC_ADMINISTRATOR, false, &ChatHandler::HandleGroupDisbandCommand, "", NULL },
{ "remove", SEC_ADMINISTRATOR, false, &ChatHandler::HandleGroupRemoveCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand guildCommandTable[] =
{
{ "create", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildCreateCommand, "", NULL },
{ "delete", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildDeleteCommand, "", NULL },
{ "invite", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildInviteCommand, "", NULL },
{ "uninvite", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildUninviteCommand, "", NULL },
{ "rank", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildRankCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand honorCommandTable[] =
{
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleHonorAddCommand, "", NULL },
{ "addkill", SEC_GAMEMASTER, false, &ChatHandler::HandleHonorAddKillCommand, "", NULL },
{ "update", SEC_GAMEMASTER, false, &ChatHandler::HandleHonorUpdateCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand instanceCommandTable[] =
{
{ "listbinds", SEC_MODERATOR, false, &ChatHandler::HandleInstanceListBindsCommand, "", NULL },
{ "unbind", SEC_MODERATOR, false, &ChatHandler::HandleInstanceUnbindCommand, "", NULL },
{ "stats", SEC_MODERATOR, true, &ChatHandler::HandleInstanceStatsCommand, "", NULL },
{ "savedata", SEC_MODERATOR, false, &ChatHandler::HandleInstanceSaveDataCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand learnCommandTable[] =
{
{ "all", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLearnAllCommand, "", NULL },
{ "all_gm", SEC_GAMEMASTER, false, &ChatHandler::HandleLearnAllGMCommand, "", NULL },
{ "all_crafts", SEC_GAMEMASTER, false, &ChatHandler::HandleLearnAllCraftsCommand, "", NULL },
{ "all_default", SEC_MODERATOR, false, &ChatHandler::HandleLearnAllDefaultCommand, "", NULL },
{ "all_lang", SEC_MODERATOR, false, &ChatHandler::HandleLearnAllLangCommand, "", NULL },
{ "all_myclass", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLearnAllMyClassCommand, "", NULL },
{ "all_myspells", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLearnAllMySpellsCommand, "", NULL },
{ "all_mytalents", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLearnAllMyTalentsCommand, "", NULL },
{ "all_recipes", SEC_GAMEMASTER, false, &ChatHandler::HandleLearnAllRecipesCommand, "", NULL },
{ "", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLearnCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand listCommandTable[] =
{
{ "creature", SEC_ADMINISTRATOR, true, &ChatHandler::HandleListCreatureCommand, "", NULL },
{ "item", SEC_ADMINISTRATOR, true, &ChatHandler::HandleListItemCommand, "", NULL },
{ "object", SEC_ADMINISTRATOR, true, &ChatHandler::HandleListObjectCommand, "", NULL },
{ "auras", SEC_ADMINISTRATOR, false, &ChatHandler::HandleListAurasCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand lookupPlayerCommandTable[] =
{
{ "ip", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupPlayerIpCommand, "", NULL },
{ "account", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupPlayerAccountCommand, "", NULL },
{ "email", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupPlayerEmailCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand lookupCommandTable[] =
{
{ "area", SEC_MODERATOR, true, &ChatHandler::HandleLookupAreaCommand, "", NULL },
{ "creature", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupCreatureCommand, "", NULL },
{ "event", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupEventCommand, "", NULL },
{ "faction", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupFactionCommand, "", NULL },
{ "item", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupItemCommand, "", NULL },
{ "itemset", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupItemSetCommand, "", NULL },
{ "object", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupObjectCommand, "", NULL },
{ "quest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupQuestCommand, "", NULL },
{ "player", SEC_GAMEMASTER, true, NULL, "", lookupPlayerCommandTable },
{ "skill", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupSkillCommand, "", NULL },
{ "spell", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupSpellCommand, "", NULL },
{ "tele", SEC_MODERATOR, true, &ChatHandler::HandleLookupTeleCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
@@ -147,112 +293,71 @@ ChatCommand * ChatHandler::getCommandTable()
{ "honor", SEC_MODERATOR, false, &ChatHandler::HandleModifyHonorCommand, "", NULL },
{ "rep", SEC_MODERATOR, false, &ChatHandler::HandleModifyRepCommand, "", NULL },
{ "arena", SEC_MODERATOR, false, &ChatHandler::HandleModifyArenaCommand, "", NULL },
{ "drunk", SEC_MODERATOR, false, &ChatHandler::HandleDrunkCommand, "", NULL },
{ "standstate", SEC_GAMEMASTER, false, &ChatHandler::HandleStandStateCommand, "", NULL },
{ "morph", SEC_GAMEMASTER, false, &ChatHandler::HandleMorphCommand, "", NULL },
{ "drunk", SEC_MODERATOR, false, &ChatHandler::HandleModifyDrunkCommand, "", NULL },
{ "standstate", SEC_GAMEMASTER, false, &ChatHandler::HandleModifyStandStateCommand, "", NULL },
{ "morph", SEC_GAMEMASTER, false, &ChatHandler::HandleModifyMorphCommand, "", NULL },
{ "phase", SEC_GAMEMASTER, false, &ChatHandler::HandleModifyPhaseCommand, "", NULL },
{ "gender", SEC_ADMINISTRATOR, false, &ChatHandler::HandleModifyGenderCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand wpCommandTable[] =
static ChatCommand npcCommandTable[] =
{
{ "show", SEC_GAMEMASTER, false, &ChatHandler::HandleWpShowCommand, "", NULL },
{ "addwp", SEC_GAMEMASTER, false, &ChatHandler::HandleWpAddCommand, "", NULL },
{ "load", SEC_GAMEMASTER, false, &ChatHandler::HandleWpLoadPathCommand, "", NULL },
{ "modify", SEC_GAMEMASTER, false, &ChatHandler::HandleWpModifyCommand, "", NULL },
{ "event", SEC_GAMEMASTER, false, &ChatHandler::HandleWpEventCommand, "", NULL },
{ "unload", SEC_GAMEMASTER, false, &ChatHandler::HandleWpUnLoadPathCommand, "", NULL },
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAddCommand, "", NULL },
{ "additem", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAddVendorItemCommand, "", NULL },
{ "addmove", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAddMoveCommand, "", NULL },
{ "changeentry", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcChangeEntryCommand, "", NULL },
{ "changelevel", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcChangeLevelCommand, "", NULL },
{ "delete", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcDeleteCommand, "", NULL },
{ "factionid", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcFactionIdCommand, "", NULL },
{ "flag", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcFlagCommand, "", NULL },
{ "follow", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcFollowCommand, "", NULL },
{ "info", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcInfoCommand, "", NULL },
{ "move", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcMoveCommand, "", NULL },
{ "playemote", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcPlayEmoteCommand, "", NULL },
{ "setmodel", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetModelCommand, "", NULL },
{ "setmovetype", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetMoveTypeCommand, "", NULL },
{ "setphase", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetPhaseCommand, "", NULL },
{ "spawndist", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSpawnDistCommand, "", NULL },
{ "spawntime", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSpawnTimeCommand, "", NULL },
{ "say", SEC_MODERATOR, false, &ChatHandler::HandleNpcSayCommand, "", NULL },
{ "textemote", SEC_MODERATOR, false, &ChatHandler::HandleNpcTextEmoteCommand, "", NULL },
{ "unfollow", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcUnFollowCommand, "", NULL },
{ "whisper", SEC_MODERATOR, false, &ChatHandler::HandleNpcWhisperCommand, "", NULL },
{ "yell", SEC_MODERATOR, false, &ChatHandler::HandleNpcYellCommand, "", NULL },
{ "tame", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcTameCommand, "", NULL },
{ "setdeathstate", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetDeathStateCommand, "", NULL },
//{ TODO: fix or remove this commands
{ "addweapon", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcAddWeaponCommand, "", NULL },
{ "name", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcNameCommand, "", NULL },
{ "subname", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSubNameCommand, "", NULL },
//}
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand banCommandTable[] =
static ChatCommand petCommandTable[] =
{
{ "account", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanAccountCommand, "", NULL },
{ "character", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanCharacterCommand, "", NULL },
{ "ip", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanIPCommand, "", NULL },
{ "create", SEC_GAMEMASTER, false, &ChatHandler::HandleCreatePetCommand, "", NULL },
{ "learn", SEC_GAMEMASTER, false, &ChatHandler::HandlePetLearnCommand, "", NULL },
{ "unlearn", SEC_GAMEMASTER, false, &ChatHandler::HandlePetUnlearnCommand, "", NULL },
{ "tp", SEC_GAMEMASTER, false, &ChatHandler::HandlePetTpCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand baninfoCommandTable[] =
static ChatCommand pdumpCommandTable[] =
{
{ "account", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanInfoAccountCommand, "", NULL },
{ "character", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanInfoCharacterCommand, "", NULL },
{ "ip", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanInfoIPCommand, "", NULL },
{ "load", SEC_ADMINISTRATOR, true, &ChatHandler::HandlePDumpLoadCommand, "", NULL },
{ "write", SEC_ADMINISTRATOR, true, &ChatHandler::HandlePDumpWriteCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand banlistCommandTable[] =
static ChatCommand questCommandTable[] =
{
{ "account", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanListAccountCommand, "", NULL },
{ "character", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanListCharacterCommand, "", NULL },
{ "ip", SEC_ADMINISTRATOR, true, &ChatHandler::HandleBanListIPCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand unbanCommandTable[] =
{
{ "account", SEC_ADMINISTRATOR, true, &ChatHandler::HandleUnBanAccountCommand, "", NULL },
{ "character", SEC_ADMINISTRATOR, true, &ChatHandler::HandleUnBanCharacterCommand, "", NULL },
{ "ip", SEC_ADMINISTRATOR, true, &ChatHandler::HandleUnBanIPCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand debugCommandTable[] =
{
{ "inarc", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugInArcCommand, "", NULL },
{ "spellfail", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugSpellFailCommand, "", NULL },
{ "setpoi", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSetPoiCommand, "", NULL },
{ "qpartymsg", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendQuestPartyMsgCommand, "", NULL },
{ "qinvalidmsg", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendQuestInvalidMsgCommand, "", NULL },
{ "equiperr", SEC_ADMINISTRATOR, false, &ChatHandler::HandleEquipErrorCommand, "", NULL },
{ "sellerr", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSellErrorCommand, "", NULL },
{ "buyerr", SEC_ADMINISTRATOR, false, &ChatHandler::HandleBuyErrorCommand, "", NULL },
{ "sendopcode", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendOpcodeCommand, "", NULL },
{ "spawnvehicle", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSpawnVehicle, "", NULL },
{ "uws", SEC_ADMINISTRATOR, false, &ChatHandler::HandleUpdateWorldStateCommand, "", NULL },
{ "ps", SEC_ADMINISTRATOR, false, &ChatHandler::HandlePlaySound2Command, "", NULL },
{ "scn", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendChannelNotifyCommand, "", NULL },
{ "scm", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendChatMsgCommand, "", NULL },
{ "sps", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendSetPhaseShiftCommand, "", NULL },
{ "getitemstate", SEC_ADMINISTRATOR, false, &ChatHandler::HandleGetItemState, "", NULL },
{ "playsound", SEC_MODERATOR, false, &ChatHandler::HandlePlaySoundCommand, "", NULL },
{ "update", SEC_ADMINISTRATOR, false, &ChatHandler::HandleUpdate, "", NULL },
{ "setvalue", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSetValue, "", NULL },
{ "getvalue", SEC_ADMINISTRATOR, false, &ChatHandler::HandleGetValue, "", NULL },
{ "setbit", SEC_ADMINISTRATOR, false, &ChatHandler::HandleSet32Bit, "", NULL },
{ "Mod32Value", SEC_ADMINISTRATOR, false, &ChatHandler::HandleMod32Value, "", NULL },
{ "anim", SEC_GAMEMASTER, false, &ChatHandler::HandleAnimCommand, "", NULL },
{ "lootrecipient", SEC_GAMEMASTER, false, &ChatHandler::HandleGetLootRecipient, "", NULL },
{ "arena", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugArenaCommand, "", NULL },
{ "bg", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDebugBattlegroundCommand, "", NULL },
{ "sendlargepacket",SEC_ADMINISTRATOR, false, &ChatHandler::HandleSendLargePacketCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand eventCommandTable[] =
{
{ "activelist", SEC_GAMEMASTER, true, &ChatHandler::HandleEventActiveListCommand, "", NULL },
{ "start", SEC_GAMEMASTER, true, &ChatHandler::HandleEventStartCommand, "", NULL },
{ "stop", SEC_GAMEMASTER, true, &ChatHandler::HandleEventStopCommand, "", NULL },
{ "", SEC_GAMEMASTER, true, &ChatHandler::HandleEventInfoCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand learnCommandTable[] =
{
{ "all", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLearnAllCommand, "", NULL },
{ "all_gm", SEC_GAMEMASTER, false, &ChatHandler::HandleLearnAllGMCommand, "", NULL },
{ "all_crafts", SEC_GAMEMASTER, false, &ChatHandler::HandleLearnAllCraftsCommand, "", NULL },
{ "all_default", SEC_MODERATOR, false, &ChatHandler::HandleLearnAllDefaultCommand, "", NULL },
{ "all_lang", SEC_MODERATOR, false, &ChatHandler::HandleLearnAllLangCommand, "", NULL },
{ "all_myclass", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLearnAllMyClassCommand, "", NULL },
{ "all_myspells", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLearnAllMySpellsCommand, "", NULL },
{ "all_mytalents", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLearnAllMyTalentsCommand, "", NULL },
{ "all_recipes", SEC_GAMEMASTER, false, &ChatHandler::HandleLearnAllRecipesCommand, "", NULL },
{ "", SEC_ADMINISTRATOR, false, &ChatHandler::HandleLearnCommand, "", NULL },
{ "add", SEC_ADMINISTRATOR, false, &ChatHandler::HandleQuestAdd, "", NULL },
{ "complete", SEC_ADMINISTRATOR, false, &ChatHandler::HandleQuestComplete, "", NULL },
{ "remove", SEC_ADMINISTRATOR, false, &ChatHandler::HandleQuestRemove, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
@@ -338,67 +443,6 @@ ChatCommand * ChatHandler::getCommandTable()
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand honorCommandTable[] =
{
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleAddHonorCommand, "", NULL },
{ "addkill", SEC_GAMEMASTER, false, &ChatHandler::HandleHonorAddKillCommand, "", NULL },
{ "update", SEC_GAMEMASTER, false, &ChatHandler::HandleUpdateHonorFieldsCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand guildCommandTable[] =
{
{ "create", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildCreateCommand, "", NULL },
{ "delete", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildDeleteCommand, "", NULL },
{ "invite", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildInviteCommand, "", NULL },
{ "uninvite", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildUninviteCommand, "", NULL },
{ "rank", SEC_GAMEMASTER, true, &ChatHandler::HandleGuildRankCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand petCommandTable[] =
{
{ "create", SEC_GAMEMASTER, false, &ChatHandler::HandleCreatePetCommand, "", NULL },
{ "learn", SEC_GAMEMASTER, false, &ChatHandler::HandlePetLearnCommand, "", NULL },
{ "unlearn", SEC_GAMEMASTER, false, &ChatHandler::HandlePetUnlearnCommand, "", NULL },
{ "tp", SEC_GAMEMASTER, false, &ChatHandler::HandlePetTpCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand groupCommandTable[] =
{
{ "leader", SEC_ADMINISTRATOR, false, &ChatHandler::HandleGroupLeaderCommand, "", NULL },
{ "disband", SEC_ADMINISTRATOR, false, &ChatHandler::HandleGroupDisbandCommand, "", NULL },
{ "remove", SEC_ADMINISTRATOR, false, &ChatHandler::HandleGroupRemoveCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand lookupPlayerCommandTable[] =
{
{ "ip", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupPlayerIpCommand, "", NULL },
{ "account", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupPlayerAccountCommand, "", NULL },
{ "email", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupPlayerEmailCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand lookupCommandTable[] =
{
{ "area", SEC_MODERATOR, true, &ChatHandler::HandleLookupAreaCommand, "", NULL },
{ "creature", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupCreatureCommand, "", NULL },
{ "event", SEC_GAMEMASTER, true, &ChatHandler::HandleLookupEventCommand, "", NULL },
{ "faction", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupFactionCommand, "", NULL },
{ "item", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupItemCommand, "", NULL },
{ "itemset", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupItemSetCommand, "", NULL },
{ "object", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupObjectCommand, "", NULL },
{ "quest", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupQuestCommand, "", NULL },
{ "player", SEC_GAMEMASTER, true, NULL, "", lookupPlayerCommandTable },
{ "skill", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupSkillCommand, "", NULL },
{ "spell", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupSpellCommand, "", NULL },
{ "tele", SEC_MODERATOR, true, &ChatHandler::HandleLookupTeleCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand resetCommandTable[] =
{
{ "achievements", SEC_ADMINISTRATOR, false, &ChatHandler::HandleResetAchievementsCommand, "", NULL },
@@ -411,133 +455,82 @@ ChatCommand * ChatHandler::getCommandTable()
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand castCommandTable[] =
static ChatCommand serverIdleRestartCommandTable[] =
{
{ "back", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastBackCommand, "", NULL },
{ "dist", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastDistCommand, "", NULL },
{ "self", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastSelfCommand, "", NULL },
{ "target", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastTargetCommand, "", NULL },
{ "", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCastCommand, "", NULL },
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerIdleRestartCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand pdumpCommandTable[] =
static ChatCommand serverIdleShutdownCommandTable[] =
{
{ "load", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLoadPDumpCommand, "", NULL },
{ "write", SEC_ADMINISTRATOR, true, &ChatHandler::HandleWritePDumpCommand, "", NULL },
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerIdleShutDownCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand listCommandTable[] =
static ChatCommand serverRestartCommandTable[] =
{
{ "creature", SEC_ADMINISTRATOR, true, &ChatHandler::HandleListCreatureCommand, "", NULL },
{ "item", SEC_ADMINISTRATOR, true, &ChatHandler::HandleListItemCommand, "", NULL },
{ "object", SEC_ADMINISTRATOR, true, &ChatHandler::HandleListObjectCommand, "", NULL },
{ "auras", SEC_ADMINISTRATOR, false, &ChatHandler::HandleListAurasCommand, "", NULL },
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerRestartCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand serverShutdownCommandTable[] =
{
{ "cancel", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCancelCommand,"", NULL },
{ "" , SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerShutDownCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand serverSetCommandTable[] =
{
{ "difftime", SEC_CONSOLE, true, &ChatHandler::HandleServerSetDiffTimeCommand, "", NULL },
{ "loglevel", SEC_CONSOLE, true, &ChatHandler::HandleServerSetLogLevelCommand, "", NULL },
{ "motd", SEC_ADMINISTRATOR, true, &ChatHandler::HandleServerSetMotdCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand serverCommandTable[] =
{
{ "corpses", SEC_GAMEMASTER, true, &ChatHandler::HandleServerCorpsesCommand, "", NULL },
{ "exit", SEC_CONSOLE, true, &ChatHandler::HandleServerExitCommand, "", NULL },
{ "idlerestart", SEC_ADMINISTRATOR, true, NULL, "", serverIdleRestartCommandTable },
{ "idleshutdown", SEC_ADMINISTRATOR, true, NULL, "", serverShutdownCommandTable },
{ "info", SEC_PLAYER, true, &ChatHandler::HandleServerInfoCommand, "", NULL },
{ "motd", SEC_PLAYER, true, &ChatHandler::HandleServerMotdCommand, "", NULL },
{ "restart", SEC_ADMINISTRATOR, true, NULL, "", serverRestartCommandTable },
{ "shutdown", SEC_ADMINISTRATOR, true, NULL, "", serverShutdownCommandTable },
{ "set", SEC_ADMINISTRATOR, true, NULL, "", serverSetCommandTable },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand teleCommandTable[] =
{
{ "add", SEC_ADMINISTRATOR, false, &ChatHandler::HandleAddTeleCommand, "", NULL },
{ "del", SEC_ADMINISTRATOR, true, &ChatHandler::HandleDelTeleCommand, "", NULL },
{ "name", SEC_MODERATOR, true, &ChatHandler::HandleNameTeleCommand, "", NULL },
{ "group", SEC_MODERATOR, false, &ChatHandler::HandleGroupTeleCommand, "", NULL },
{ "add", SEC_ADMINISTRATOR, false, &ChatHandler::HandleTeleAddCommand, "", NULL },
{ "del", SEC_ADMINISTRATOR, true, &ChatHandler::HandleTeleDelCommand, "", NULL },
{ "name", SEC_MODERATOR, true, &ChatHandler::HandleTeleNameCommand, "", NULL },
{ "group", SEC_MODERATOR, false, &ChatHandler::HandleTeleGroupCommand, "", NULL },
{ "", SEC_MODERATOR, false, &ChatHandler::HandleTeleCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand npcCommandTable[] =
static ChatCommand unbanCommandTable[] =
{
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAddCommand, "", NULL },
{ "additem", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAddVendorItemCommand, "", NULL },
{ "addmove", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcAddMoveCommand, "", NULL },
{ "changeentry", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcChangeEntryCommand, "", NULL },
{ "changelevel", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcChangeLevelCommand, "", NULL },
{ "delete", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcDeleteCommand, "", NULL },
{ "factionid", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcFactionIdCommand, "", NULL },
{ "flag", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcFlagCommand, "", NULL },
{ "follow", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcFollowCommand, "", NULL },
{ "info", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcInfoCommand, "", NULL },
{ "move", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcMoveCommand, "", NULL },
{ "playemote", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcPlayEmoteCommand, "", NULL },
{ "setmodel", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetModelCommand, "", NULL },
{ "setmovetype", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetMoveTypeCommand, "", NULL },
{ "setphase", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetPhaseCommand, "", NULL },
{ "spawndist", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSpawnDistCommand, "", NULL },
{ "spawntime", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSpawnTimeCommand, "", NULL },
{ "say", SEC_MODERATOR, false, &ChatHandler::HandleNpcSayCommand, "", NULL },
{ "textemote", SEC_MODERATOR, false, &ChatHandler::HandleNpcTextEmoteCommand, "", NULL },
{ "unfollow", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcUnFollowCommand, "", NULL },
{ "whisper", SEC_MODERATOR, false, &ChatHandler::HandleNpcWhisperCommand, "", NULL },
{ "yell", SEC_MODERATOR, false, &ChatHandler::HandleNpcYellCommand, "", NULL },
{ "addtemp", SEC_GAMEMASTER, false, &ChatHandler::HandleTempAddSpwCommand, "", NULL },
{ "addformation", SEC_MODERATOR, false, &ChatHandler::HandleNpcAddFormationCommand, "", NULL },
{ "tame", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcTameCommand, "", NULL },
{ "setdeathstate", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSetDeathStateCommand, "", NULL },
//{ TODO: fix or remove this commands
{ "addweapon", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNpcAddWeaponCommand, "", NULL },
{ "name", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcNameCommand, "", NULL },
{ "subname", SEC_GAMEMASTER, false, &ChatHandler::HandleNpcSubNameCommand, "", NULL },
//}
{ "account", SEC_ADMINISTRATOR, true, &ChatHandler::HandleUnBanAccountCommand, "", NULL },
{ "character", SEC_ADMINISTRATOR, true, &ChatHandler::HandleUnBanCharacterCommand, "", NULL },
{ "ip", SEC_ADMINISTRATOR, true, &ChatHandler::HandleUnBanIPCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand goCommandTable[] =
static ChatCommand wpCommandTable[] =
{
{ "grid", SEC_MODERATOR, false, &ChatHandler::HandleGoGridCommand, "", NULL },
{ "creature", SEC_GAMEMASTER, false, &ChatHandler::HandleGoCreatureCommand, "", NULL },
{ "object", SEC_GAMEMASTER, false, &ChatHandler::HandleGoObjectCommand, "", NULL },
{ "trigger", SEC_GAMEMASTER, false, &ChatHandler::HandleGoTriggerCommand, "", NULL },
{ "graveyard", SEC_GAMEMASTER, false, &ChatHandler::HandleGoGraveyardCommand, "", NULL },
{ "zonexy", SEC_MODERATOR, false, &ChatHandler::HandleGoZoneXYCommand, "", NULL },
{ "xy", SEC_MODERATOR, false, &ChatHandler::HandleGoXYCommand, "", NULL },
{ "xyz", SEC_MODERATOR, false, &ChatHandler::HandleGoXYZCommand, "", NULL },
{ "", SEC_MODERATOR, false, &ChatHandler::HandleGoXYZCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand gobjectCommandTable[] =
{
{ "add", SEC_GAMEMASTER, false, &ChatHandler::HandleGameObjectCommand, "", NULL },
{ "delete", SEC_GAMEMASTER, false, &ChatHandler::HandleDelObjectCommand, "", NULL },
{ "move", SEC_GAMEMASTER, false, &ChatHandler::HandleMoveObjectCommand, "", NULL },
{ "near", SEC_ADMINISTRATOR, false, &ChatHandler::HandleNearObjectCommand, "", NULL },
{ "activate", SEC_GAMEMASTER, false, &ChatHandler::HandleActivateObjectCommand, "", NULL },
{ "addtemp", SEC_GAMEMASTER, false, &ChatHandler::HandleTempGameObjectCommand, "", NULL },
{ "setphase", SEC_GAMEMASTER, false, &ChatHandler::HandleGOPhaseCommand, "", NULL },
{ "target", SEC_GAMEMASTER, false, &ChatHandler::HandleTargetObjectCommand, "", NULL },
{ "turn", SEC_GAMEMASTER, false, &ChatHandler::HandleTurnObjectCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand questCommandTable[] =
{
{ "add", SEC_ADMINISTRATOR, false, &ChatHandler::HandleAddQuest, "", NULL },
{ "complete", SEC_ADMINISTRATOR, false, &ChatHandler::HandleCompleteQuest, "", NULL },
{ "remove", SEC_ADMINISTRATOR, false, &ChatHandler::HandleRemoveQuest, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand gmCommandTable[] =
{
{ "chat", SEC_MODERATOR, false, &ChatHandler::HandleGMChatCommand, "", NULL },
{ "ingame", SEC_PLAYER, true, &ChatHandler::HandleGMListIngameCommand, "", NULL },
{ "list", SEC_ADMINISTRATOR, true, &ChatHandler::HandleGMListFullCommand, "", NULL },
{ "visible", SEC_MODERATOR, false, &ChatHandler::HandleVisibleCommand, "", NULL },
{ "fly", SEC_ADMINISTRATOR, false, &ChatHandler::HandleFlyModeCommand, "", NULL },
{ "", SEC_MODERATOR, false, &ChatHandler::HandleGMmodeCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
static ChatCommand instanceCommandTable[] =
{
{ "listbinds", SEC_MODERATOR, false, &ChatHandler::HandleInstanceListBindsCommand, "", NULL },
{ "unbind", SEC_MODERATOR, false, &ChatHandler::HandleInstanceUnbindCommand, "", NULL },
{ "stats", SEC_MODERATOR, true, &ChatHandler::HandleInstanceStatsCommand, "", NULL },
{ "savedata", SEC_MODERATOR, false, &ChatHandler::HandleInstanceSaveDataCommand, "", NULL },
{ "show", SEC_GAMEMASTER, false, &ChatHandler::HandleWpShowCommand, "", NULL },
{ "addwp", SEC_GAMEMASTER, false, &ChatHandler::HandleWpAddCommand, "", NULL },
{ "load", SEC_GAMEMASTER, false, &ChatHandler::HandleWpLoadPathCommand, "", NULL },
{ "modify", SEC_GAMEMASTER, false, &ChatHandler::HandleWpModifyCommand, "", NULL },
{ "event", SEC_GAMEMASTER, false, &ChatHandler::HandleWpEventCommand, "", NULL },
{ "unload", SEC_GAMEMASTER, false, &ChatHandler::HandleWpUnLoadPathCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
@@ -653,8 +646,7 @@ ChatCommand * ChatHandler::getCommandTable()
{ "cometome", SEC_ADMINISTRATOR, false, &ChatHandler::HandleComeToMeCommand, "", NULL },
{ "damage", SEC_ADMINISTRATOR, false, &ChatHandler::HandleDamageCommand, "", NULL },
{ "combatstop", SEC_GAMEMASTER, false, &ChatHandler::HandleCombatStopCommand, "", NULL },
{ "ahbotoptions", SEC_ADMINISTRATOR, true, &ChatHandler::HandleAHBotOptionsCommand, "", NULL },
{ "flusharenapoints", SEC_ADMINISTRATOR, false, &ChatHandler::HandleFlushArenaPointsCommand, "", NULL },
{ "flusharenapoints",SEC_ADMINISTRATOR, false, &ChatHandler::HandleFlushArenaPointsCommand, "", NULL },
{ "chardelete", SEC_CONSOLE, true, &ChatHandler::HandleCharacterDeleteCommand, "", NULL },
{ "sendmessage", SEC_ADMINISTRATOR, true, &ChatHandler::HandleSendMessageCommand, "", NULL },
{ "playall", SEC_ADMINISTRATOR, false, &ChatHandler::HandlePlayAllCommand, "", NULL },
+47 -48
View File
@@ -120,13 +120,13 @@ class ChatHandler
bool HandleGMNotifyCommand(const char* args);
bool HandleGMmodeCommand(const char* args);
bool HandleGMChatCommand(const char* args);
bool HandleVisibleCommand(const char* args);
bool HandleGMVisibleCommand(const char* args);
bool HandleGPSCommand(const char* args);
bool HandleTaxiCheatCommand(const char* args);
bool HandleWhispersCommand(const char* args);
bool HandleNameTeleCommand(const char* args);
bool HandleGroupTeleCommand(const char* args);
bool HandleDrunkCommand(const char* args);
bool HandleTeleNameCommand(const char* args);
bool HandleTeleGroupCommand(const char* args);
bool HandleModifyDrunkCommand(const char* args);
bool HandleSendItemsCommand(const char* args);
bool HandleSendMailCommand(const char* args);
bool HandleSendMoneyCommand(const char* args);
@@ -315,13 +315,13 @@ class ChatHandler
bool HandleServerShutDownCommand(const char* args);
bool HandleServerShutDownCancelCommand(const char* args);
bool HandleAddHonorCommand(const char* args);
bool HandleHonorAddCommand(const char* args);
bool HandleHonorAddKillCommand(const char* args);
bool HandleUpdateHonorFieldsCommand(const char* args);
bool HandleHonorUpdateCommand(const char* args);
bool HandleLoadScriptsCommand(const char* args);
bool HandleSendQuestPartyMsgCommand(const char* args);
bool HandleSendQuestInvalidMsgCommand(const char* args);
bool HandleDebugSendQuestPartyMsgCommand(const char* args);
bool HandleDebugSendQuestInvalidMsgCommand(const char* args);
bool HandleDebugInArcCommand(const char* args);
bool HandleDebugSpellFailCommand(const char* args);
@@ -329,18 +329,18 @@ class ChatHandler
bool HandleGUIDCommand(const char* args);
bool HandleItemMoveCommand(const char* args);
bool HandleDeMorphCommand(const char* args);
bool HandleSetPoiCommand(const char* args);
bool HandleEquipErrorCommand(const char* args);
bool HandleDebugSetPoiCommand(const char* args);
bool HandleDebugEquipErrorCommand(const char* args);
bool HandleGoCreatureCommand(const char* args);
bool HandleGoObjectCommand(const char* args);
bool HandleGoTriggerCommand(const char* args);
bool HandleGoGraveyardCommand(const char* args);
bool HandleTargetObjectCommand(const char* args);
bool HandleDelObjectCommand(const char* args);
bool HandleMoveObjectCommand(const char* args);
bool HandleGOPhaseCommand(const char* args);
bool HandleTurnObjectCommand(const char* args);
bool HandleObjectStateCommand(const char* args);
bool HandleGameObjectTargetCommand(const char* args);
bool HandleGameObjectDeleteCommand(const char* args);
bool HandleGameObjectMoveCommand(const char* args);
bool HandleGameObjectPhaseCommand(const char* args);
bool HandleGameObjectTurnCommand(const char* args);
bool HandleGameObjectStateCommand(const char* args);
bool HandlePInfoCommand(const char* args);
bool HandlePLimitCommand(const char* args);
bool HandleMuteCommand(const char* args);
@@ -373,14 +373,14 @@ class ChatHandler
bool HandleCooldownCommand(const char* args);
bool HandleUnLearnCommand(const char* args);
bool HandleGetDistanceCommand(const char* args);
bool HandleGameObjectCommand(const char* args);
bool HandleAnimCommand(const char* args);
bool HandlePlaySoundCommand(const char* args);
bool HandleStandStateCommand(const char* args);
bool HandleGameObjectAddCommand(const char* args);
bool HandleDebugAnimCommand(const char* args);
bool HandleDebugPlaySoundCommand(const char* args);
bool HandleModifyStandStateCommand(const char* args);
bool HandleDieCommand(const char* args);
bool HandleDamageCommand(const char *args);
bool HandleReviveCommand(const char* args);
bool HandleMorphCommand(const char* args);
bool HandleModifyMorphCommand(const char* args);
bool HandleAuraCommand(const char* args);
bool HandleUnAuraCommand(const char* args);
bool HandleLinkGraveCommand(const char* args);
@@ -409,13 +409,13 @@ class ChatHandler
bool HandleGuildUninviteCommand(const char* args);
bool HandleGuildRankCommand(const char* args);
bool HandleGuildDeleteCommand(const char* args);
bool HandleUpdate(const char* args);
bool HandleDebugUpdate(const char* args);
bool HandleBankCommand(const char* args);
bool HandleChangeWeather(const char* args);
bool HandleKickPlayerCommand(const char * args);
bool HandleTeleCommand(const char * args);
bool HandleAddTeleCommand(const char * args);
bool HandleDelTeleCommand(const char * args);
bool HandleTeleAddCommand(const char * args);
bool HandleTeleDelCommand(const char * args);
bool HandleListAurasCommand(const char * args);
bool HandleResetAchievementsCommand(const char * args);
@@ -447,7 +447,7 @@ class ChatHandler
bool HandleListCreatureCommand(const char* args);
bool HandleListItemCommand(const char* args);
bool HandleListObjectCommand(const char* args);
bool HandleNearObjectCommand(const char* args);
bool HandleGameObjectNearCommand(const char* args);
bool HandlePasswordCommand(const char* args);
bool HandleLockAccountCommand(const char* args);
bool HandleRespawnCommand(const char* args);
@@ -460,19 +460,18 @@ class ChatHandler
bool HandleWpEventCommand(const char* args);
bool HandleWpShowCommand(const char* args);
bool HandleReloadAllPaths(const char *args);
bool HandleFlyModeCommand(const char* args);
bool HandleSendOpcodeCommand(const char* args);
bool HandleSellErrorCommand(const char* args);
bool HandleBuyErrorCommand(const char* args);
bool HandleUpdateWorldStateCommand(const char* args);
bool HandlePlaySound2Command(const char* args);
bool HandleSendChannelNotifyCommand(const char* args);
bool HandleSendChatMsgCommand(const char* args);
bool HandleGMFlyModeCommand(const char* args);
bool HandleDebugSendOpcodeCommand(const char* args);
bool HandleDebugSellErrorCommand(const char* args);
bool HandleDebugBuyErrorCommand(const char* args);
bool HandleDebugUpdateWorldStateCommand(const char* args);
bool HandleDebugPlaySound2Command(const char* args);
bool HandleDebugSendChannelNotifyCommand(const char* args);
bool HandleDebugSendChatMsgCommand(const char* args);
bool HandleRenameCommand(const char * args);
bool HandleCustomizeCommand(const char * args);
bool HandleLoadPDumpCommand(const char *args);
bool HandleWritePDumpCommand(const char *args);
bool HandlePDumpLoadCommand(const char *args);
bool HandlePDumpWriteCommand(const char *args);
bool HandleCastCommand(const char *args);
bool HandleCastBackCommand(const char *args);
bool HandleCastDistCommand(const char *args);
@@ -490,16 +489,16 @@ class ChatHandler
bool HandleTempAddSpwCommand(const char* args);
//! Development Commands
bool HandleSetValue(const char* args);
bool HandleGetValue(const char* args);
bool HandleSet32Bit(const char* args);
bool HandleMod32Value(const char* args);
bool HandleAddQuest(const char * args);
bool HandleRemoveQuest(const char * args);
bool HandleCompleteQuest(const char * args);
bool HandleDebugSetValue(const char* args);
bool HandleDebugGetValue(const char* args);
bool HandleDebugSet32Bit(const char* args);
bool HandleDebugMod32Value(const char* args);
bool HandleQuestAdd(const char * args);
bool HandleQuestRemove(const char * args);
bool HandleQuestComplete(const char * args);
bool HandleSaveAllCommand(const char* args);
bool HandleGetItemState(const char * args);
bool HandleGetLootRecipient(const char * args);
bool HandleDebugGetItemState(const char * args);
bool HandleDebugGetLootRecipient(const char * args);
bool HandleDebugArenaCommand(const char * args);
bool HandleDebugThreatList(const char * args);
bool HandleDebugHostilRefList(const char * args);
@@ -508,9 +507,9 @@ class ChatHandler
bool HandleBindSightCommand(const char* args);
bool HandleUnbindSightCommand(const char* args);
bool HandleDebugBattlegroundCommand(const char * args);
bool HandleSpawnVehicle(const char * args);
bool HandleSendLargePacketCommand(const char * args);
bool HandleSendSetPhaseShiftCommand(const char * args);
bool HandleDebugSpawnVehicle(const char * args);
bool HandleDebugSendLargePacketCommand(const char * args);
bool HandleDebugSendSetPhaseShiftCommand(const char * args);
Player* getSelectedPlayer();
Creature* getSelectedCreature();
+1 -1
View File
@@ -139,7 +139,7 @@ m_deathTimer(0), m_respawnTime(0), m_respawnDelay(25), m_corpseDelay(60), m_resp
m_gossipOptionLoaded(false), m_emoteState(0), m_isPet(false), m_isVehicle(false), m_isTotem(false),
m_defaultMovementType(IDLE_MOTION_TYPE), m_DBTableGuid(0), m_equipmentId(0), m_AlreadyCallAssistance(false),
m_regenHealth(true), m_AI_locked(false), m_isDeadByDefault(false), m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL),
m_creatureInfo(NULL), m_reactState(REACT_AGGRESSIVE), m_formationID(0)
m_creatureInfo(NULL), m_reactState(REACT_AGGRESSIVE), m_formationID(0), m_isSummon(false)
{
m_regenTimer = 200;
m_valuesCount = UNIT_END;
+2
View File
@@ -436,6 +436,7 @@ class TRINITY_DLL_SPEC Creature : public Unit
void GetRespawnCoord(float &x, float &y, float &z, float* ori = NULL, float* dist =NULL) const;
uint32 GetEquipmentId() const { return m_equipmentId; }
bool isSummon() const { return m_isSummon; }
bool isPet() const { return m_isPet; }
bool isVehicle() const { return m_isVehicle; }
void SetCorpseDelay(uint32 delay) { m_corpseDelay = delay; }
@@ -668,6 +669,7 @@ class TRINITY_DLL_SPEC Creature : public Unit
GossipOptionList m_goptions;
uint8 m_emoteState;
bool m_isSummon;
bool m_isPet; // set only in Pet::Pet
bool m_isVehicle; // set only in Vehicle::Vehicle
bool m_isTotem; // set only in Totem::Totem
+3
View File
@@ -26,6 +26,7 @@
#include "MovementGenerator.h"
#include "ScriptCalls.h"
#include "Pet.h"
#include "TemporarySummon.h"
INSTANTIATE_SINGLETON_1(CreatureAIRegistry);
INSTANTIATE_SINGLETON_1(MovementGeneratorRegistry);
@@ -63,6 +64,8 @@ namespace FactorySelector
ai_factory = ai_registry.GetRegistryItem("PetAI");
else if(creature->isTotem())
ai_factory = ai_registry.GetRegistryItem("TotemAI");
else if(creature->isSummon() && ((TempSummon*)creature)->m_properties && ((TempSummon*)creature)->m_properties->Type == SUMMON_TYPE_MINIPET)
ai_factory = ai_registry.GetRegistryItem("CritterAI");
else if(creature->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_TRIGGER)
ai_factory = ai_registry.GetRegistryItem("NullCreatureAI");
else if(creature->GetCreatureType() == CREATURE_TYPE_CRITTER)
+16 -16
View File
@@ -68,7 +68,7 @@ bool ChatHandler::HandleDebugSpellFailCommand(const char* args)
return true;
}
bool ChatHandler::HandleSetPoiCommand(const char* args)
bool ChatHandler::HandleDebugSetPoiCommand(const char* args)
{
Player *pPlayer = m_session->GetPlayer();
Unit* target = getSelectedUnit();
@@ -94,7 +94,7 @@ bool ChatHandler::HandleSetPoiCommand(const char* args)
return true;
}
bool ChatHandler::HandleEquipErrorCommand(const char* args)
bool ChatHandler::HandleDebugEquipErrorCommand(const char* args)
{
if(!args)
return false;
@@ -104,7 +104,7 @@ bool ChatHandler::HandleEquipErrorCommand(const char* args)
return true;
}
bool ChatHandler::HandleSellErrorCommand(const char* args)
bool ChatHandler::HandleDebugSellErrorCommand(const char* args)
{
if(!args)
return false;
@@ -114,7 +114,7 @@ bool ChatHandler::HandleSellErrorCommand(const char* args)
return true;
}
bool ChatHandler::HandleBuyErrorCommand(const char* args)
bool ChatHandler::HandleDebugBuyErrorCommand(const char* args)
{
if(!args)
return false;
@@ -124,7 +124,7 @@ bool ChatHandler::HandleBuyErrorCommand(const char* args)
return true;
}
bool ChatHandler::HandleSendOpcodeCommand(const char* /*args*/)
bool ChatHandler::HandleDebugSendOpcodeCommand(const char* /*args*/)
{
Unit *unit = getSelectedUnit();
Player *player = NULL;
@@ -221,7 +221,7 @@ bool ChatHandler::HandleSendOpcodeCommand(const char* /*args*/)
return true;
}
bool ChatHandler::HandleUpdateWorldStateCommand(const char* args)
bool ChatHandler::HandleDebugUpdateWorldStateCommand(const char* args)
{
char* w = strtok((char*)args, " ");
char* s = strtok(NULL, " ");
@@ -235,7 +235,7 @@ bool ChatHandler::HandleUpdateWorldStateCommand(const char* args)
return true;
}
bool ChatHandler::HandlePlaySound2Command(const char* args)
bool ChatHandler::HandleDebugPlaySound2Command(const char* args)
{
if(!args)
return false;
@@ -246,7 +246,7 @@ bool ChatHandler::HandlePlaySound2Command(const char* args)
}
//Send notification in channel
bool ChatHandler::HandleSendChannelNotifyCommand(const char* args)
bool ChatHandler::HandleDebugSendChannelNotifyCommand(const char* args)
{
if(!args)
return false;
@@ -264,7 +264,7 @@ bool ChatHandler::HandleSendChannelNotifyCommand(const char* args)
}
//Send notification in chat
bool ChatHandler::HandleSendChatMsgCommand(const char* args)
bool ChatHandler::HandleDebugSendChatMsgCommand(const char* args)
{
if(!args)
return false;
@@ -277,14 +277,14 @@ bool ChatHandler::HandleSendChatMsgCommand(const char* args)
return true;
}
bool ChatHandler::HandleSendQuestPartyMsgCommand(const char* args)
bool ChatHandler::HandleDebugSendQuestPartyMsgCommand(const char* args)
{
uint32 msg = atol((char*)args);
m_session->GetPlayer()->SendPushToPartyResponse(m_session->GetPlayer(), msg);
return true;
}
bool ChatHandler::HandleGetLootRecipient(const char* /*args*/)
bool ChatHandler::HandleDebugGetLootRecipient(const char* /*args*/)
{
Creature* target = getSelectedCreature();
if(!target)
@@ -294,14 +294,14 @@ bool ChatHandler::HandleGetLootRecipient(const char* /*args*/)
return true;
}
bool ChatHandler::HandleSendQuestInvalidMsgCommand(const char* args)
bool ChatHandler::HandleDebugSendQuestInvalidMsgCommand(const char* args)
{
uint32 msg = atol((char*)args);
m_session->GetPlayer()->SendCanTakeQuestResponse(msg);
return true;
}
bool ChatHandler::HandleGetItemState(const char* args)
bool ChatHandler::HandleDebugGetItemState(const char* args)
{
if (!args)
return false;
@@ -590,7 +590,7 @@ bool ChatHandler::HandleDebugHostilRefList(const char * /*args*/)
return true;
}
bool ChatHandler::HandleSpawnVehicle(const char* args)
bool ChatHandler::HandleDebugSpawnVehicle(const char* args)
{
if(!args)
return false;
@@ -640,7 +640,7 @@ bool ChatHandler::HandleSpawnVehicle(const char* args)
return true;
}
bool ChatHandler::HandleSendLargePacketCommand(const char* /*args*/)
bool ChatHandler::HandleDebugSendLargePacketCommand(const char* /*args*/)
{
const char* stuffingString = "This is a dummy string to push the packet's size beyond 128000 bytes. ";
std::ostringstream ss;
@@ -650,7 +650,7 @@ bool ChatHandler::HandleSendLargePacketCommand(const char* /*args*/)
return true;
}
bool ChatHandler::HandleSendSetPhaseShiftCommand(const char* args)
bool ChatHandler::HandleDebugSendSetPhaseShiftCommand(const char* args)
{
if(!args)
return false;
+7 -6
View File
@@ -1406,20 +1406,21 @@ const char* GameObject::GetNameForLocaleIdx(int32 loc_idx) const
void GameObject::UpdateRotationFields(float rotation2 /*=0.0f*/, float rotation3 /*=0.0f*/)
{
static double const atan_pow = atan(pow(2.0f, -20.0f));
SetFloatValue(GAMEOBJECT_FACING, GetOrientation());
int64 rotation = 0;
double f_rot1 = sin(GetOrientation() / 2.0f);
int64 i_rot1 = int64(f_rot1 / atan(pow(2.0f, -20.0f)));
rotation |= (i_rot1 << 43 >> 43) & 0x00000000001FFFFF;
double f_rot2 = cos(GetOrientation() / 2.0f);
int64 i_rot1 = int64(f_rot1 / atan_pow *(f_rot2 >= 0 ? 1.0f : -1.0f));
int64 rotation = (i_rot1 << 43 >> 43) & 0x00000000001FFFFF;
SetUInt64Value(GAMEOBJECT_ROTATION, rotation);
if(rotation2==0.0f && rotation3==0.0f)
{
rotation2 = sin(GetOrientation()/2);
rotation3 = cos(GetOrientation()/2);
rotation2 = f_rot1;
rotation3 = f_rot2;
}
SetFloatValue(GAMEOBJECT_PARENTROTATION+2, rotation2);
+5 -5
View File
@@ -626,7 +626,7 @@ bool ChatHandler::HandleGMTicketReloadCommand(const char*)
}
//Enable\Dissable Invisible mode
bool ChatHandler::HandleVisibleCommand(const char* args)
bool ChatHandler::HandleGMVisibleCommand(const char* args)
{
if (!*args)
{
@@ -2384,7 +2384,7 @@ bool ChatHandler::HandleWhispersCommand(const char* args)
}
//Play sound
bool ChatHandler::HandlePlaySoundCommand(const char* args)
bool ChatHandler::HandleDebugPlaySoundCommand(const char* args)
{
// USAGE: .debug playsound #soundid
// #soundid - ID decimal number from SoundEntries.dbc (1st column)
@@ -2501,7 +2501,7 @@ bool ChatHandler::HandleSendMailCommand(const char* args)
}
// teleport player to given game_tele.entry
bool ChatHandler::HandleNameTeleCommand(const char * args)
bool ChatHandler::HandleTeleNameCommand(const char * args)
{
if(!*args)
return false;
@@ -2586,7 +2586,7 @@ bool ChatHandler::HandleNameTeleCommand(const char * args)
}
//Teleport group to given game_tele.entry
bool ChatHandler::HandleGroupTeleCommand(const char * args)
bool ChatHandler::HandleTeleGroupCommand(const char * args)
{
if(!*args)
return false;
@@ -2985,7 +2985,7 @@ bool ChatHandler::HandleGoGridCommand(const char* args)
return true;
}
bool ChatHandler::HandleDrunkCommand(const char* args)
bool ChatHandler::HandleModifyDrunkCommand(const char* args)
{
if(!*args) return false;
+521 -473
View File
File diff suppressed because it is too large Load Diff
+14 -57
View File
@@ -2901,48 +2901,7 @@ bool ChatHandler::HandleListObjectCommand(const char* args)
return true;
}
bool ChatHandler::HandleNearObjectCommand(const char* args)
{
float distance = (!*args) ? 10 : atol(args);
uint32 count = 0;
Player* pl = m_session->GetPlayer();
QueryResult *result = WorldDatabase.PQuery("SELECT guid, id, position_x, position_y, position_z, map, "
"(POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) AS order_ "
"FROM gameobject WHERE map='%u' AND (POW(position_x - '%f', 2) + POW(position_y - '%f', 2) + POW(position_z - '%f', 2)) <= '%f' ORDER BY order_",
pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(),
pl->GetMapId(),pl->GetPositionX(), pl->GetPositionY(), pl->GetPositionZ(),distance*distance);
if (result)
{
do
{
Field *fields = result->Fetch();
uint32 guid = fields[0].GetUInt32();
uint32 entry = fields[1].GetUInt32();
float x = fields[2].GetFloat();
float y = fields[3].GetFloat();
float z = fields[4].GetFloat();
int mapid = fields[5].GetUInt16();
GameObjectInfo const * gInfo = objmgr.GetGameObjectInfo(entry);
if(!gInfo)
continue;
PSendSysMessage(LANG_GO_LIST_CHAT, guid, guid, gInfo->name, x, y, z, mapid);
++count;
} while (result->NextRow());
delete result;
}
PSendSysMessage(LANG_COMMAND_NEAROBJMESSAGE,distance,count);
return true;
}
bool ChatHandler::HandleObjectStateCommand(const char* args)
bool ChatHandler::HandleGameObjectStateCommand(const char* args)
{
// number or [name] Shift-click form |color|Hgameobject:go_id|h[name]|h|r
char* cId = extractKeyFromLink((char*)args, "Hgameobject");
@@ -2976,8 +2935,6 @@ bool ChatHandler::HandleObjectStateCommand(const char* args)
gobj->SetGoState(state);
return true;
return true;
}
bool ChatHandler::HandleListCreatureCommand(const char* args)
@@ -4556,7 +4513,7 @@ bool ChatHandler::HandleHideAreaCommand(const char* args)
return true;
}
bool ChatHandler::HandleUpdate(const char* args)
bool ChatHandler::HandleDebugUpdate(const char* args)
{
if(!*args)
return false;
@@ -4656,7 +4613,7 @@ bool ChatHandler::HandleChangeWeather(const char* args)
return true;
}
bool ChatHandler::HandleSetValue(const char* args)
bool ChatHandler::HandleDebugSetValue(const char* args)
{
if(!*args)
return false;
@@ -4707,7 +4664,7 @@ bool ChatHandler::HandleSetValue(const char* args)
return true;
}
bool ChatHandler::HandleGetValue(const char* args)
bool ChatHandler::HandleDebugGetValue(const char* args)
{
if(!*args)
return false;
@@ -4756,7 +4713,7 @@ bool ChatHandler::HandleGetValue(const char* args)
return true;
}
bool ChatHandler::HandleSet32Bit(const char* args)
bool ChatHandler::HandleDebugSet32Bit(const char* args)
{
if(!*args)
return false;
@@ -4789,7 +4746,7 @@ bool ChatHandler::HandleSet32Bit(const char* args)
return true;
}
bool ChatHandler::HandleMod32Value(const char* args)
bool ChatHandler::HandleDebugMod32Value(const char* args)
{
if(!*args)
return false;
@@ -4821,7 +4778,7 @@ bool ChatHandler::HandleMod32Value(const char* args)
return true;
}
bool ChatHandler::HandleAddTeleCommand(const char * args)
bool ChatHandler::HandleTeleAddCommand(const char * args)
{
if(!*args)
return false;
@@ -4861,7 +4818,7 @@ bool ChatHandler::HandleAddTeleCommand(const char * args)
return true;
}
bool ChatHandler::HandleDelTeleCommand(const char * args)
bool ChatHandler::HandleTeleDelCommand(const char * args)
{
if(!*args)
return false;
@@ -5459,7 +5416,7 @@ bool ChatHandler::HandleServerIdleShutDownCommand(const char* args)
return true;
}
bool ChatHandler::HandleAddQuest(const char* args)
bool ChatHandler::HandleQuestAdd(const char* args)
{
Player* player = getSelectedPlayer();
if(!player)
@@ -5513,7 +5470,7 @@ bool ChatHandler::HandleAddQuest(const char* args)
return true;
}
bool ChatHandler::HandleRemoveQuest(const char* args)
bool ChatHandler::HandleQuestRemove(const char* args)
{
Player* player = getSelectedPlayer();
if(!player)
@@ -5563,7 +5520,7 @@ bool ChatHandler::HandleRemoveQuest(const char* args)
return true;
}
bool ChatHandler::HandleCompleteQuest(const char* args)
bool ChatHandler::HandleQuestComplete(const char* args)
{
Player* player = getSelectedPlayer();
if(!player)
@@ -6155,7 +6112,7 @@ bool ChatHandler::HandleRespawnCommand(const char* /*args*/)
return true;
}
bool ChatHandler::HandleFlyModeCommand(const char* args)
bool ChatHandler::HandleGMFlyModeCommand(const char* args)
{
if(!args)
return false;
@@ -6181,7 +6138,7 @@ bool ChatHandler::HandleFlyModeCommand(const char* args)
return true;
}
bool ChatHandler::HandleLoadPDumpCommand(const char *args)
bool ChatHandler::HandlePDumpLoadCommand(const char *args)
{
if(!args)
return false;
@@ -6292,7 +6249,7 @@ bool ChatHandler::HandleLoadPDumpCommand(const char *args)
return true;
}
bool ChatHandler::HandleWritePDumpCommand(const char *args)
bool ChatHandler::HandlePDumpWriteCommand(const char *args)
{
if(!args)
return false;
+5 -4
View File
@@ -1578,9 +1578,9 @@ void WorldObject::AddObjectToRemoveList()
map->AddObjectToRemoveList(this);
}
Creature* WorldObject::SummonCreature(uint32 id, float x, float y, float z, float ang,TempSummonType spwtype,uint32 despwtime)
TempSummon* WorldObject::SummonCreature(uint32 id, float x, float y, float z, float ang,TempSummonType spwtype,uint32 despwtime)
{
TemporarySummon* pCreature = new TemporarySummon(GetGUID());
TempSummon* pCreature = new TempSummon(GetGUID());
uint32 team = 0;
if (GetTypeId()==TYPEID_PLAYER)
@@ -1625,12 +1625,13 @@ Vehicle* WorldObject::SummonVehicle(uint32 entry, float x, float y, float z, flo
{
CreatureInfo const *ci = objmgr.GetCreatureTemplate(entry);
if(!ci)
return false;
return NULL;
uint32 id = ci->spells[7]; //temp store id here
if(!id) id = 156;
VehicleEntry const *ve = sVehicleStore.LookupEntry(id);
if(!ve)
return false;
return NULL;
Vehicle *v = new Vehicle;
Map *map = GetMap();
+2 -1
View File
@@ -104,6 +104,7 @@ class Player;
class UpdateMask;
class InstanceData;
class GameObject;
class TempSummon;
class Vehicle;
typedef UNORDERED_MAP<Player*, UpdateData> UpdateDataMapType;
@@ -499,7 +500,7 @@ class TRINITY_DLL_SPEC WorldObject : public Object
Map * GetMap() const;
Map const* GetBaseMap() const;
Creature* SummonCreature(uint32 id, float x, float y, float z, float ang,TempSummonType spwtype,uint32 despwtime);
TempSummon* SummonCreature(uint32 id, float x, float y, float z, float ang,TempSummonType spwtype,uint32 despwtime);
Vehicle* SummonVehicle(uint32 entry, float x, float y, float z, float ang);
GameObject* SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime);
Creature* SummonTrigger(float x, float y, float z, float ang, uint32 dur, CreatureAI* (*GetAI)(Creature*) = NULL);
+1 -9
View File
@@ -51,7 +51,7 @@ m_declinedname(NULL)
// pets always have a charminfo, even if they are not actually charmed
CharmInfo* charmInfo = InitCharmInfo();
if(type == MINI_PET || type == POSSESSED_PET) // always passive
if(type == POSSESSED_PET) // always passive
SetReactState(REACT_PASSIVE);
else if(type == GUARDIAN_PET) // always aggressive
SetReactState(REACT_AGGRESSIVE);
@@ -744,11 +744,6 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
return false;
}
if(cinfo->type == CREATURE_TYPE_CRITTER)
{
setPetType(MINI_PET);
return true;
}
SetDisplayId(creature->GetDisplayId());
SetNativeDisplayId(creature->GetNativeDisplayId());
SetMaxPower(POWER_HAPPINESS, GetCreatePowers(POWER_HAPPINESS));
@@ -1725,9 +1720,6 @@ bool Pet::Create(uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry, uint3
SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE);
if(getPetType() == MINI_PET) // always non-attackable
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
return true;
}
+2 -3
View File
@@ -30,9 +30,8 @@ enum PetType
SUMMON_PET = 0,
HUNTER_PET = 1,
GUARDIAN_PET = 2,
MINI_PET = 3,
POSSESSED_PET = 4,
MAX_PET_TYPE = 5
POSSESSED_PET = 3,
MAX_PET_TYPE = 4
};
extern char const* petTypeSuffix[MAX_PET_TYPE];
-23
View File
@@ -458,7 +458,6 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this)
m_mover = this;
m_seer = this;
m_miniPet = 0;
m_bgAfkReportedTimer = 0;
m_contestedPvPTimer = 0;
@@ -1426,7 +1425,6 @@ void Player::setDeathState(DeathState s)
RemovePet(NULL, PET_SAVE_NOT_IN_SLOT, true);
// remove uncontrolled pets
RemoveMiniPet();
RemoveGuardians();
// save value before aura remove in Unit::setDeathState
@@ -1888,8 +1886,6 @@ void Player::RemoveFromWorld()
///- Release charmed creatures, unsummon totems and remove pets/guardians
StopCastingCharm();
StopCastingBindSight();
UnsummonAllTotems();
RemoveMiniPet();
RemoveGuardians();
}
@@ -17055,9 +17051,6 @@ void Player::RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent)
// only if current pet in slot
switch(pet->getPetType())
{
case MINI_PET:
m_miniPet = 0;
break;
case GUARDIAN_PET:
m_guardianPets.erase(pet->GetGUID());
break;
@@ -17105,22 +17098,6 @@ void Player::RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent)
}
}
void Player::RemoveMiniPet()
{
if(Pet* pet = GetMiniPet())
{
pet->Remove(PET_SAVE_AS_DELETED);
m_miniPet = 0;
}
}
Pet* Player::GetMiniPet()
{
if(!m_miniPet)
return NULL;
return ObjectAccessor::GetPet(m_miniPet);
}
void Player::RemoveGuardians()
{
while(!m_guardianPets.empty())
-4
View File
@@ -1052,9 +1052,6 @@ class TRINITY_DLL_SPEC Player : public Unit
Pet* SummonPet(uint32 entry, float x, float y, float z, float ang, PetType petType, uint32 despwtime);
void RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent = false);
void RemoveMiniPet();
Pet* GetMiniPet();
void SetMiniPet(Pet* pet) { m_miniPet = pet->GetGUID(); }
void RemoveGuardians();
bool HasGuardianWithEntry(uint32 entry);
void AddGuardian(Pet* pet) { m_guardianPets.insert(pet->GetGUID()); }
@@ -2423,7 +2420,6 @@ class TRINITY_DLL_SPEC Player : public Unit
uint32 m_temporaryUnsummonedPetNumber;
uint32 m_oldpetspell;
uint64 m_miniPet;
GuardianPetList m_guardianPets;
// Player summoning
+11 -5
View File
@@ -2375,13 +2375,19 @@ enum DungeonDifficulties
TOTAL_DIFFICULTIES
};
enum SummonCategory
{
SUMMON_CATEGORY_WILD = 0,
SUMMON_CATEGORY_ALLY = 1,
SUMMON_CATEGORY_GUARDIAN = 2,
SUMMON_CATEGORY_POSSESSED = 3,
SUMMON_CATEGORY_VEHICLE = 4,
};
enum SummonType
{
//SUMMON_TYPE_WILD = 0,
//SUMMON_TYPE_ALLY = 1,
//SUMMON_TYPE_GUARDIAN = 2,
SUMMON_TYPE_POSSESSED = 3,
SUMMON_TYPE_VEHICLE = 4,
SUMMON_TYPE_MINIPET = 5,
SUMMON_TYPE_CRITTER = 41,
SUMMON_TYPE_GUARDIAN = 61,
SUMMON_TYPE_TOTEM_SLOT1 = 63,
+3 -4
View File
@@ -1524,7 +1524,6 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
// TagUnitMap.push_back(target);
//else
m_caster->GetRaidMember(TagUnitMap, radius_f);
TagUnitMap.push_back(m_caster);
break;
}
}break;
@@ -1541,7 +1540,7 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
switch(cur)
{
case TARGET_UNIT_MINIPET:
if( target->GetTypeId() == TYPEID_UNIT && ((Creature*)target)->isPet() && ((Pet*)target)->getPetType() == MINI_PET)
if(target->GetGUID() == m_caster->m_TotemSlot[4])
TagUnitMap.push_back(target);
break;
case TARGET_UNIT_TARGET_ALLY:
@@ -4172,9 +4171,9 @@ SpellCastResult Spell::CheckCast(bool strict)
SummonPropertiesEntry const *SummonProperties = sSummonPropertiesStore.LookupEntry(m_spellInfo->EffectMiscValueB[i]);
if(!SummonProperties)
break;
switch(SummonProperties->Group)
switch(SummonProperties->Category)
{
case SUMMON_TYPE_POSSESSED:
case SUMMON_CATEGORY_POSSESSED:
{
if(m_caster->GetPetGUID())
return SPELL_FAILED_ALREADY_HAVE_SUMMON;
+3
View File
@@ -598,6 +598,9 @@ class Spell
void SpellDamageSchoolDmg(uint32 i);
void SpellDamageWeaponDmg(uint32 i);
void SpellDamageHeal(uint32 i);
void GetSummonPosition(float &x, float &y, float &z, float radius = 0.0f, uint32 count = 0);
SpellCastResult CanOpenLock(uint32 effIndex, uint32 lockid, SkillType& skillid, int32& reqSkillValue, int32& skillValue);
// -------------------------------------------
+60 -111
View File
@@ -1166,7 +1166,7 @@ void Spell::EffectDummy(uint32 i)
if(!unitTarget)
return;
TemporarySummon* tempSummon = dynamic_cast<TemporarySummon*>(unitTarget);
TempSummon* tempSummon = dynamic_cast<TempSummon*>(unitTarget);
if(!tempSummon)
return;
@@ -3333,11 +3333,6 @@ void Spell::EffectSummonType(uint32 i)
case SUMMON_TYPE_SUMMON:
EffectSummon(i);
break;
case SUMMON_TYPE_CRITTER:
case SUMMON_TYPE_CRITTER2:
case SUMMON_TYPE_CRITTER3:
EffectSummonCritter(i);
break;
case SUMMON_TYPE_TOTEM_SLOT1:
case SUMMON_TYPE_TOTEM_SLOT2:
case SUMMON_TYPE_TOTEM_SLOT3:
@@ -3358,15 +3353,18 @@ void Spell::EffectSummonType(uint32 i)
sLog.outError("EffectSummonType: Unhandled summon type %u", m_spellInfo->EffectMiscValueB[i]);
return;
}
switch(SummonProperties->Group)
switch(SummonProperties->Category)
{
default:
EffectSummonWild(i);
if(SummonProperties->Type == SUMMON_TYPE_MINIPET)
EffectSummonCritter(i);
else
EffectSummonWild(i);
break;
case SUMMON_TYPE_POSSESSED:
case SUMMON_CATEGORY_POSSESSED:
EffectSummonPossessed(i);
break;
case SUMMON_TYPE_VEHICLE:
case SUMMON_CATEGORY_VEHICLE:
EffectSummonVehicle(i);
break;
}
@@ -3683,11 +3681,6 @@ void Spell::EffectSummonWild(uint32 i)
}
}
// select center of summon position
float center_x = m_targets.m_destX;
float center_y = m_targets.m_destY;
float center_z = m_targets.m_destZ;
float radius = GetSpellRadiusForHostile(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i]));
int32 amount = damage > 0 ? damage : 1;
@@ -3695,23 +3688,7 @@ void Spell::EffectSummonWild(uint32 i)
for(int32 count = 0; count < amount; ++count)
{
float px, py, pz;
// If dest location if present
if (m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION)
{
// Summon 1 unit in dest location
if (count == 0)
{
px = m_targets.m_destX;
py = m_targets.m_destY;
pz = m_targets.m_destZ;
}
// Summon in random point all other units if location present
else
m_caster->GetRandomPoint(center_x,center_y,center_z,radius,px,py,pz);
}
// Summon if dest location not present near caster
else
m_caster->GetClosePoint(px,py,pz,3.0f);
GetSummonPosition(px, py, pz, radius, count);
int32 duration = GetSpellDuration(m_spellInfo);
@@ -5101,6 +5078,22 @@ void Spell::EffectScriptEffect(uint32 effIndex)
DoCreateItem( effIndex, itemtype );
return;
}
// Everlasting Affliction
case 47422:
// Refresh corruption on target
Unit::AuraMap& auras = unitTarget->GetAuras();
for(Unit::AuraMap::iterator itr = auras.begin(); itr != auras.end(); ++itr)
{
SpellEntry const *spellInfo = (*itr).second->GetSpellProto();
if( spellInfo->SpellFamilyName == SPELLFAMILY_WARLOCK &&
spellInfo->SpellFamilyFlags[0] & 0x2 &&
(*itr).second->GetCasterGUID() == m_caster->GetGUID())
{
unitTarget->RefreshAurasByCasterSpell(spellInfo->Id, m_caster->GetGUID());
return;
}
}
break;
}
break;
}
@@ -5122,7 +5115,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
spellInfo->SpellFamilyFlags[0] & 0x8000 &&
(*itr).second->GetCasterGUID() == m_caster->GetGUID())
{
(*itr).second->RefreshAura();
unitTarget->RefreshAurasByCasterSpell((*itr).second->GetId(), m_caster->GetGUID());
return;
}
}
@@ -5572,10 +5565,8 @@ void Spell::EffectSummonTotem(uint32 i)
return;
}
float angle = slot < MAX_TOTEM ? M_PI/MAX_TOTEM - (slot*2*M_PI/MAX_TOTEM) : 0;
float x,y,z;
m_caster->GetClosePoint(x,y,z,pTotem->GetObjectSize(),2.0f,angle);
GetSummonPosition(x, y, z);
// totem must be at same Z in case swimming caster and etc.
if( fabs( z - m_caster->GetPositionZ() ) > 5 )
@@ -6036,76 +6027,33 @@ void Spell::EffectSummonCritter(uint32 i)
if(!pet_entry)
return;
Pet* old_critter = player->GetMiniPet();
// for same pet just despawn
if(old_critter && old_critter->GetEntry() == pet_entry)
{
player->RemoveMiniPet();
return;
}
// despawn old pet before summon new
if(old_critter)
player->RemoveMiniPet();
// summon new pet
Pet* critter = new Pet(MINI_PET);
Map *map = m_caster->GetMap();
uint32 pet_number = objmgr.GeneratePetNumber();
if(!critter->Create(objmgr.GenerateLowGuid(HIGHGUID_PET), map, m_caster->GetPhaseMask(),
pet_entry, pet_number))
{
sLog.outError("Spell::EffectSummonCritter, spellid %u: no such creature entry %u", m_spellInfo->Id, pet_entry);
delete critter;
return;
}
float x,y,z;
// If dest location if present
if (m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION)
{
x = m_targets.m_destX;
y = m_targets.m_destY;
z = m_targets.m_destZ;
}
// Summon if dest location not present near caster
else
m_caster->GetClosePoint(x,y,z,critter->GetObjectSize());
GetSummonPosition(x, y, z);
critter->Relocate(x,y,z,m_caster->GetOrientation());
if(!critter->IsPositionValid())
{
sLog.outError("ERROR: Pet (guidlow %d, entry %d) not summoned. Suggested coordinates isn't valid (X: %f Y: %f)",
critter->GetGUIDLow(), critter->GetEntry(), critter->GetPositionX(), critter->GetPositionY());
delete critter;
int32 duration = GetSpellDuration(m_spellInfo);
TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN;
TempSummon *critter = m_caster->SummonCreature(pet_entry, x, y, z, m_caster->GetOrientation(), summonType, duration);
if(!critter)
return;
}
critter->SetOwnerGUID(m_caster->GetGUID());
critter->SetCreatorGUID(m_caster->GetGUID());
critter->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE,m_caster->getFaction());
critter->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
critter->AIM_Initialize();
critter->InitPetCreateSpells(); // e.g. disgusting oozeling has a create spell as critter...
//critter->InitPetCreateSpells(); // e.g. disgusting oozeling has a create spell as critter...
critter->SetMaxHealth(1);
critter->SetHealth(1);
critter->SetLevel(1);
// set timer for unsummon
int32 duration = GetSpellDuration(m_spellInfo);
if(duration > 0)
critter->SetDuration(duration);
critter->SetReactState(REACT_PASSIVE);
critter->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
std::string name = player->GetName();
name.append(petTypeSuffix[critter->getPetType()]);
name.append(petTypeSuffix[3]);
critter->SetName( name );
player->SetMiniPet(critter);
map->Add((Creature*)critter);
critter->SetSummonProperties(sSummonPropertiesStore.LookupEntry(m_spellInfo->EffectMiscValueB[i]));
}
void Spell::EffectKnockBack(uint32 i)
@@ -6554,11 +6502,6 @@ void Spell::EffectSkill(uint32 /*i*/)
void Spell::EffectSummonDemon(uint32 i)
{
// select center of summon position
float center_x = m_targets.m_destX;
float center_y = m_targets.m_destY;
float center_z = m_targets.m_destZ;
float radius = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i]));
int32 amount = damage > 0 ? damage : 1;
@@ -6566,23 +6509,7 @@ void Spell::EffectSummonDemon(uint32 i)
for(int32 count = 0; count < amount; ++count)
{
float px, py, pz;
// If dest location if present
if (m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION)
{
// Summon 1 unit in dest location
if (count == 0)
{
px = m_targets.m_destX;
py = m_targets.m_destY;
pz = m_targets.m_destZ;
}
// Summon in random point all other units if location present
else
m_caster->GetRandomPoint(center_x,center_y,center_z,radius,px,py,pz);
}
// Summon if dest location not present near caster
else
m_caster->GetClosePoint(px,py,pz,3.0f);
GetSummonPosition(px, py, pz, radius, count);
int32 duration = GetSpellDuration(m_spellInfo);
@@ -6787,10 +6714,32 @@ void Spell::EffectSummonVehicle(uint32 i)
float x, y, z;
m_caster->GetClosePoint(x, y, z, DEFAULT_WORLD_OBJECT_SIZE);
Vehicle *vehicle = m_caster->SummonVehicle(entry, x, y, z, m_caster->GetOrientation());
if(!vehicle)
return;
vehicle->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
}
void Spell::GetSummonPosition(float &x, float &y, float &z, float radius, uint32 count)
{
if (m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION)
{
// Summon 1 unit in dest location
if (count == 0)
{
x = m_targets.m_destX;
y = m_targets.m_destY;
z = m_targets.m_destZ;
}
// Summon in random point all other units if location present
else
m_caster->GetRandomPoint(m_targets.m_destX,m_targets.m_destY,m_targets.m_destZ,radius,x,y,z);
}
// Summon if dest location not present near caster
else
m_caster->GetClosePoint(x,y,z,3.0f);
}
void Spell::EffectRenamePet(uint32 /*eff_idx*/)
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT ||
+42 -8
View File
@@ -23,12 +23,14 @@
#include "ObjectAccessor.h"
#include "CreatureAI.h"
TemporarySummon::TemporarySummon( uint64 summoner ) :
TempSummon::TempSummon( uint64 summoner ) :
Creature(), m_type(TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN), m_timer(0), m_lifetime(0), m_summoner(summoner)
, m_properties(NULL)
{
m_isSummon = true;
}
void TemporarySummon::Update( uint32 diff )
void TempSummon::Update( uint32 diff )
{
if (m_deathState == DEAD)
{
@@ -157,7 +159,7 @@ void TemporarySummon::Update( uint32 diff )
Creature::Update( diff );
}
void TemporarySummon::Summon(TempSummonType type, uint32 lifetime)
void TempSummon::Summon(TempSummonType type, uint32 lifetime)
{
m_type = type;
m_timer = lifetime;
@@ -168,19 +170,51 @@ void TemporarySummon::Summon(TempSummonType type, uint32 lifetime)
AIM_Initialize();
}
void TemporarySummon::UnSummon()
void TempSummon::UnSummon()
{
CleanupsBeforeDelete();
AddObjectToRemoveList();
Unit* sum = m_summoner ? ObjectAccessor::GetUnit(*this, m_summoner) : NULL;
if (sum && sum->GetTypeId() == TYPEID_UNIT && ((Creature*)sum)->IsAIEnabled)
Unit* owner = GetSummoner();
if(owner)
{
((Creature*)sum)->AI()->SummonedCreatureDespawn(this);
if(owner->GetTypeId() == TYPEID_UNIT && ((Creature*)owner)->IsAIEnabled)
((Creature*)owner)->AI()->SummonedCreatureDespawn(this);
if(uint32 slot = m_properties->Slot)
{
--slot;
owner->m_TotemSlot[slot] = 0;
}
}
}
void TemporarySummon::SaveToDB()
void TempSummon::SetSummonProperties(SummonPropertiesEntry const *properties)
{
if(!properties)
return;
m_properties = properties;
if(uint32 slot = m_properties->Slot)
{
--slot;
Unit* owner = GetSummoner();
if(owner)
{
if(owner->m_TotemSlot[slot] && owner->m_TotemSlot[slot] != GetGUID())
{
Creature *OldTotem = ObjectAccessor::GetCreature(*this, owner->m_TotemSlot[slot]);
if(OldTotem && OldTotem->isSummon())
((TempSummon*)OldTotem)->UnSummon();
}
owner->m_TotemSlot[slot] = GetGUID();
}
}
AIM_Initialize();
}
void TempSummon::SaveToDB()
{
}
+7 -4
View File
@@ -24,16 +24,19 @@
#include "Creature.h"
#include "ObjectAccessor.h"
class TemporarySummon : public Creature
class TempSummon : public Creature
{
public:
explicit TemporarySummon(uint64 summoner = 0);
virtual ~TemporarySummon(){};
explicit TempSummon(uint64 summoner = 0);
virtual ~TempSummon(){};
void Update(uint32 time);
void Summon(TempSummonType type, uint32 lifetime);
void UnSummon();
virtual void UnSummon();
void SaveToDB();
Unit* GetSummoner() const { return m_summoner ? ObjectAccessor::GetUnit(*this, m_summoner) : NULL; }
void SetSummonProperties(SummonPropertiesEntry const *properties);
SummonPropertiesEntry const *m_properties;
private:
TempSummonType m_type;
uint32 m_timer;
+1 -1
View File
@@ -26,7 +26,7 @@
#include "ObjectMgr.h"
#include "SpellMgr.h"
Totem::Totem() : Creature()
Totem::Totem() : TempSummon(0)
{
m_isTotem = true;
m_duration = 0;
+2 -2
View File
@@ -21,7 +21,7 @@
#ifndef TRINITYCORE_TOTEM_H
#define TRINITYCORE_TOTEM_H
#include "Creature.h"
#include "TemporarySummon.h"
enum TotemType
{
@@ -32,7 +32,7 @@ enum TotemType
#define SENTRY_TOTEM_ENTRY 3968
class Totem : public Creature
class Totem : public TempSummon
{
public:
explicit Totem();
+74 -22
View File
@@ -50,6 +50,7 @@
#include "PetAI.h"
#include "NullCreatureAI.h"
#include "Traveller.h"
#include "TemporarySummon.h"
#include <math.h>
@@ -4133,6 +4134,23 @@ void Unit::RemoveAurasByCasterSpell(uint32 spellId, uint8 effindex, uint64 caste
}
}
void Unit::RefreshAurasByCasterSpell(uint32 spellId, uint64 casterGUID)
{
// Lookup for auras already applied from spell
for(uint8 i = 0; i < 3; ++i)
{
spellEffectPair spair = spellEffectPair(spellId, i);
for(AuraMap::const_iterator itr = GetAuras().lower_bound(spair); itr != GetAuras().upper_bound(spair); ++itr)
{
if(itr->second->GetCasterGUID()==casterGUID)
{
itr->second->RefreshAura();
break;
}
}
}
}
void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit *dispeler)
{
for (AuraMap::iterator iter = m_Auras.begin(); iter != m_Auras.end(); )
@@ -4381,7 +4399,7 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
{
if(AurSpellInfo->Effect[i] == SPELL_EFFECT_SUMMON)
if(SummonPropertiesEntry const *SummonProperties = sSummonPropertiesStore.LookupEntry(AurSpellInfo->EffectMiscValueB[i]))
if(SummonProperties->Group == SUMMON_TYPE_POSSESSED)
if(SummonProperties->Category == SUMMON_CATEGORY_POSSESSED)
{
((Player*)caster)->StopCastingCharm();
break;
@@ -4614,17 +4632,25 @@ void Unit::RemoveGameObject(GameObject* gameObj, bool del)
{
assert(gameObj && gameObj->GetOwnerGUID()==GetGUID());
// GO created by some spell
if ( GetTypeId()==TYPEID_PLAYER && gameObj->GetSpellId() )
{
SpellEntry const* createBySpell = sSpellStore.LookupEntry(gameObj->GetSpellId());
// Need activate spell use for owner
if (createBySpell && createBySpell->Attributes & SPELL_ATTR_DISABLED_WHILE_ACTIVE)
// note: item based cooldowns and cooldown spell mods with charges ignored (unknown existed cases)
((Player*)this)->SendCooldownEvent(createBySpell);
}
gameObj->SetOwnerGUID(0);
// GO created by some spell
if (uint32 spellid = gameObj->GetSpellId())
{
RemoveAurasDueToSpell(spellid);
if (GetTypeId()==TYPEID_PLAYER)
{
SpellEntry const* createBySpell = sSpellStore.LookupEntry(spellid );
// Need activate spell use for owner
if (createBySpell && createBySpell->Attributes & SPELL_ATTR_DISABLED_WHILE_ACTIVE)
// note: item based cooldowns and cooldown spell mods with charges ignored (unknown existed cases)
((Player*)this)->SendCooldownEvent(createBySpell);
}
}
m_gameObj.remove(gameObj);
if(del)
{
gameObj->SetRespawnTime(0);
@@ -5640,6 +5666,23 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
case 30295:
case 30296:
{
// Improved Soul Leech
AuraList const& SoulLeechAuras = GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator i = SoulLeechAuras.begin();i != SoulLeechAuras.end(); ++i)
{
if ((*i)->GetId()==54117 || (*i)->GetId()==54118)
{
basepoints0 = int32((*i)->GetModifier()->m_amount);
if (target = GetPet())
{
// regen mana for pet
CastCustomSpell(target,54607,&basepoints0,NULL,NULL,true,castItem,triggeredByAura);
}
// regen mana for caster
CastCustomSpell(this,59117,&basepoints0,NULL,NULL,true,castItem,triggeredByAura);
break;
}
}
// health
basepoints0 = int32(damage*triggerAmount/100);
target = this;
@@ -8325,8 +8368,8 @@ void Unit::UnsummonAllTotems()
continue;
Creature *OldTotem = ObjectAccessor::GetCreature(*this, m_TotemSlot[i]);
if (OldTotem && OldTotem->isTotem())
((Totem*)OldTotem)->UnSummon();
if(OldTotem && OldTotem->isSummon())
((TempSummon*)OldTotem)->UnSummon();
}
}
@@ -11355,6 +11398,7 @@ void Unit::RemoveFromWorld()
// cleanup
if(IsInWorld())
{
UnsummonAllTotems();
RemoveCharmAuras();
RemoveBindSightAuras();
RemoveNotOwnSingleTargetAuras();
@@ -12656,7 +12700,7 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit *pVictim, Aura* aura, SpellEntry con
if(Player* modOwner = GetSpellModOwner())
{
modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_CHANCE_OF_SUCCESS,chance);
modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_PROC_CHANCE,chance);
modOwner->ApplySpellMod(spellProto->Id,SPELLMOD_PROC_PER_MINUTE,chance);
}
return roll_chance_f(chance);
@@ -13376,17 +13420,25 @@ void Unit::GetRaidMember(std::list<Unit*> &nearMembers, float radius)
return;
Group *pGroup = owner->GetGroup();
if(!pGroup)
return;
for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
if(pGroup)
{
Player* Target = itr->getSource();
for(GroupReference *itr = pGroup->GetFirstMember(); itr != NULL; itr = itr->next())
{
Player* Target = itr->getSource();
// IsHostileTo check duel and controlled by enemy
if( Target && Target != this && Target->isAlive()
&& IsWithinDistInMap(Target, radius) && !IsHostileTo(Target) )
nearMembers.push_back(Target);
// IsHostileTo check duel and controlled by enemy
if( Target && Target != this && Target->isAlive()
&& IsWithinDistInMap(Target, radius) && !IsHostileTo(Target) )
nearMembers.push_back(Target);
}
}
else
{
if(owner->isAlive() && (owner == this || IsWithinDistInMap(owner, radius)))
nearMembers.push_back(owner);
if(Pet* pet = owner->GetPet())
if(pet->isAlive() && (pet == this && IsWithinDistInMap(pet, radius)))
nearMembers.push_back(pet);
}
}
+4 -2
View File
@@ -114,7 +114,7 @@ enum SpellModOp
SPELLMOD_EFFECT3 = 23,
SPELLMOD_SPELL_BONUS_DAMAGE = 24,
// spellmod 25
SPELLMOD_PROC_CHANCE = 26,
SPELLMOD_PROC_PER_MINUTE = 26,
SPELLMOD_MULTIPLE_VALUE = 27,
SPELLMOD_RESIST_DISPEL_CHANCE = 28,
SPELLMOD_CRIT_DAMAGE_BONUS_2 = 29, //one not used spell
@@ -822,7 +822,8 @@ enum ReactiveType
};
#define MAX_REACTIVE 3
#define MAX_TOTEM 4
#define MAX_TOTEM 4
#define MAX_SUMMON_SLOT 6
struct AuraSlotEntry
{
@@ -1235,6 +1236,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
void RemoveAurasDueToItemSpell(Item* castItem,uint32 spellId);
void RemoveAurasByCasterSpell(uint32 spellId, uint64 casterGUID, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT);
void RemoveAurasByCasterSpell(uint32 spellId, uint8 effindex, uint64 casterGUID, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT);
void RefreshAurasByCasterSpell(uint32 spellId, uint64 casterGUID);
void RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit *dispeler);
void RemoveAurasDueToSpellBySteal(uint32 spellId, uint64 casterGUID, Unit *stealer);
void RemoveAurasDueToSpellByCancel(uint32 spellId);
+1 -1
View File
@@ -337,7 +337,7 @@ void LoadDBCStores(const std::string& dataPath)
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellRuneCostStore, dbcPath,"SpellRuneCost.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSpellShapeshiftStore, dbcPath,"SpellShapeshiftForm.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sStableSlotPricesStore, dbcPath,"StableSlotPrices.dbc");
//LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSummonPropertiesStore, dbcPath,"SummonProperties.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sSummonPropertiesStore, dbcPath,"SummonProperties.dbc");
LoadDBC(availableDbcLocales,bar,bad_dbc_files,sTalentStore, dbcPath,"Talent.dbc");
// create talent spells set
+1 -1
View File
@@ -1401,7 +1401,7 @@ struct StableSlotPricesEntry
struct SummonPropertiesEntry
{
uint32 Id; // 0
uint32 Group; // 1, 0 - can't be controlled?, 1 - something guardian?, 2 - pet?, 3 - something controllable?, 4 - taxi/mount?
uint32 Category; // 1, 0 - can't be controlled?, 1 - something guardian?, 2 - pet?, 3 - something controllable?, 4 - taxi/mount?
uint32 Unk2; // 2, 14 rows > 0
uint32 Type; // 3, see enum
uint32 Slot; // 4, 0-6