[svn] * Merge Temp dev SVN with Assembla.

* Changes include:
   - Implementation of w12x's Outdoor PvP and Game Event Systems.
   - Temporary removal of IRC Chat Bot (until infinite loop when disabled is fixed).
   - All mangos -> trinity (to convert your mangos_string table, please run mangos_string_to_trinity_string.sql).
   - Improved Config cleanup.
   - And many more changes.

--HG--
branch : trunk
This commit is contained in:
Seline committed 2008-10-14 11:57:03 -05:00
1 parent 222cbfd464
commit 2265aef916
463 files changed
+10750 -7723

No files matched your search

+2 -1
View File
@@ -4,7 +4,7 @@
#
# 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 3 of the License, or
# 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,
@@ -28,3 +28,4 @@ EXTRA_DIST = win
+17 -16
View File
@@ -1,4 +1,6 @@
# Copyright (C) 2005-2008 MaNGOS project <http://www.mangosproject.org/>
# Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
#
# Thanks to the original authors: MaNGOS <http://www.mangosproject.org/>
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
@@ -159,7 +161,7 @@ fi
## Check for options
# Include debug info in library?
AC_MSG_CHECKING(whether to include debug info in library)
MANGOSD_DEBUG_INFO=no
TRINITYD_DEBUG_INFO=no
AC_ARG_WITH(debug-info,
[
Debugging options:
@@ -167,47 +169,47 @@ Debugging options:
--with-debug-info Include debug info in library],
[
if test "$withval" = "yes" ; then
CFLAGS="-g -DMANGOS_DEBUG $CFLAGS"
CXXFLAGS="-g -DMANGOS_DEBUG $CXXFLAGS"
MANGOSD_DEBUG_INFO=yes
CFLAGS="-g -DTRINITY_DEBUG $CFLAGS"
CXXFLAGS="-g -DTRINITY_DEBUG $CXXFLAGS"
TRINITYD_DEBUG_INFO=yes
elif test "$withval" != "no" ; then
AC_MSG_ERROR(Please choose yes or no)
fi
])
AC_MSG_RESULT($MANGOSD_DEBUG_INFO)
AC_MSG_RESULT($TRINITYD_DEBUG_INFO)
# Enable CLI console?
AC_MSG_CHECKING(whether cli console is enabled)
MANGOSD_ENABLE_CLI=no
TRINITYD_ENABLE_CLI=no
AC_ARG_ENABLE(cli,
[ --enable-cli Turn on command console system],
[
if test "$enableval" = "yes" ; then
CFLAGS="-DENABLE_CLI $CFLAGS"
CXXFLAGS="-DENABLE_CLI $CXXFLAGS"
MANGOSD_ENABLE_CLI=yes
TRINITYD_ENABLE_CLI=yes
elif test "$withval" != "no" ; then
AC_MSG_ERROR(Please choose yes or no)
fi
])
AC_MSG_RESULT($MANGOSD_ENABLE_CLI)
AC_MSG_RESULT($TRINITYD_ENABLE_CLI)
# Enable remote console?
AC_MSG_CHECKING(whether remote console is enabled)
MANGOSD_ENABLE_RA=no
TRINITYD_ENABLE_RA=no
AC_ARG_ENABLE(ra,
[ --enable-ra Turn on remote console system],
[
if test "$enableval" = "yes" ; then
CFLAGS="-DENABLE_RA $CFLAGS"
CXXFLAGS="-DENABLE_RA $CXXFLAGS"
MANGOSD_ENABLE_RA=yes
TRINITYD_ENABLE_RA=yes
elif test "$withval" != "no" ; then
AC_MSG_ERROR(Please choose yes or no)
fi
])
AC_MSG_RESULT($MANGOSD_ENABLE_RA)
AC_MSG_RESULT($TRINITYD_ENABLE_RA)
## Check for required header files.
AC_HEADER_STDC
@@ -287,9 +289,9 @@ AC_SUBST(MYSQL_LIBS)
AC_SUBST(POSTGRE_INCLUDES)
AC_SUBST(POSTGRE_LIBS)
AC_SUBST(DOXYGEN)
AC_SUBST(MANGOSD_DEBUG_INFO)
AC_SUBST(MANGOSD_ENABLE_CLI)
AC_SUBST(MANGOSD_ENABLE_RA)
AC_SUBST(TRINITYD_DEBUG_INFO)
AC_SUBST(TRINITYD_ENABLE_CLI)
AC_SUBST(TRINITYD_ENABLE_RA)
AC_SUBST(TRINI_INCLUDES)
AC_SUBST(TRINI_LIBS)
@@ -314,7 +316,6 @@ AC_CONFIG_FILES([
src/game/Makefile
src/trinityrealm/Makefile
src/trinitycore/Makefile
src/game/IRCConf.h
src/bindings/Makefile
src/bindings/interface/Makefile
])
+1 -1
View File
@@ -4,7 +4,7 @@
#
# 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 3 of the License, or
# 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,
+1 -1
View File
@@ -16,7 +16,7 @@
#
# 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 3 of the License, or
# 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,
+2 -2
View File
@@ -451,7 +451,7 @@ namespace VMAP
//====================================================================
Vector3 ModelContainerView::convertPositionToMangosRep(float x, float y, float z) const {
Vector3 ModelContainerView::convertPositionToTrinityRep(float x, float y, float z) const {
float pos[3];
pos[0] = z;
pos[1] = x;
@@ -490,7 +490,7 @@ namespace VMAP
#if 0
i_App->defaultController.getPosition();
Vector3 pos = i_App->defaultController.getPosition();
Vector3 pos2 = convertPositionToMangosRep(pos.x, pos.y, pos.z);
Vector3 pos2 = convertPositionToTrinityRep(pos.x, pos.y, pos.z);
//Vector3 pos3 = iVMapManager->convertPositionToInternalRep(pos2.x, pos2.y, pos2.z);
//pos3 = iVMapManager->convertPositionToInternalRep(pos2.x, pos2.y, pos2.z);
+1 -1
View File
@@ -51,7 +51,7 @@ namespace VMAP
bool iPosSent;
Array<Command> iPrevLoadCommands;
private:
Vector3 convertPositionToMangosRep(float x, float y, float z) const;
Vector3 convertPositionToTrinityRep(float x, float y, float z) const;
public:
ModelContainerView(const G3D::GApp::Settings& settings);
+1 -1
View File
@@ -4,7 +4,7 @@
#
# 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 3 of the License, or
# 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,
+1 -1
View File
@@ -4,7 +4,7 @@
#
# 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 3 of the License, or
# 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,
+1 -1
View File
@@ -192,7 +192,7 @@
// http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_core_Compiler_Reference.asp
//
#if 0 //ignore that for mangos
#if 0 //ignore that for Trinity
// DLL runtime
#ifndef _DLL
#define _DLL
@@ -118,7 +118,7 @@ public:
// Saving and loading generator state
void save( uint32* saveArray ) const; // to array of size SAVE
void load( uint32 *const loadArray ); // from such array
/* Mangos not use streams for random values output
/* Trinity not use streams for random values output
friend std::ostream& operator<<( std::ostream& os, const MTRand& mtrand );
friend std::istream& operator>>( std::istream& is, MTRand& mtrand );
*/
@@ -350,7 +350,7 @@ inline void MTRand::load( uint32 *const loadArray )
pNext = &state[N-left];
}
/* Mangos not use streams for random values output
/* Trinity not use streams for random values output
inline std::ostream& operator<<( std::ostream& os, const MTRand& mtrand )
{
register const MTRand::uint32 *s = mtrand.state;
+2 -2
View File
@@ -30,7 +30,7 @@ DEALINGS IN THE SOFTWARE.
#include <iterator>
// use MaNGOS core types
// use Trinity core types
#include "Platform/Define.h"
namespace utf8
@@ -39,7 +39,7 @@ namespace utf8
// You may need to change them to match your system.
// These typedefs have the same names as ones from cstdint, or boost/cstdint
/* use MaNGOS alternatives
/* use Trinity alternatives
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
+2 -1
View File
@@ -4,7 +4,7 @@
#
# 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 3 of the License, or
# 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,
@@ -51,3 +51,4 @@ EXTRA_DIST += \
x64_release/libmySQL.dll \
x64_release/libmysql.lib
+1 -1
View File
@@ -4,7 +4,7 @@
#
# 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 3 of the License, or
# 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,
+1 -1
View File
@@ -4,7 +4,7 @@
#
# 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 3 of the License, or
# 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,
+1 -1
View File
@@ -4,7 +4,7 @@
#
# 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 3 of the License, or
# 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,
+1 -1
View File
@@ -4,7 +4,7 @@
#
# 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 3 of the License, or
# 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,
+22
View File
@@ -661,6 +661,28 @@ LOCK TABLES `corpse` WRITE;
/*!40000 ALTER TABLE `corpse` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `game_event_condition_save`
--
CREATE TABLE `game_event_condition_save` (
`event_id` mediumint(8) unsigned NOT NULL,
`condition_id` mediumint(8) unsigned NOT NULL default '0',
`done` float default '0',
PRIMARY KEY (`event_id`,`condition_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `game_event_save`
--
CREATE TABLE `game_event_save` (
`event_id` mediumint(8) unsigned NOT NULL,
`state` tinyint(3) unsigned NOT NULL default '1',
`next_start` timestamp NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`event_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `groups`
--
+1 -1
View File
@@ -4,7 +4,7 @@
#
# 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 3 of the License, or
# 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,
+3 -3
View File
@@ -15,9 +15,9 @@ INSERT INTO `command` (`name`, `security`, `help`) VALUES
('debug arena',3,'Syntax: .debug arena\r\n\r\n Toggles arena 1v1 or normal mode.');
DELETE FROM mangos_string WHERE entry IN (711,712);
DELETE FROM mangos_string WHERE entry BETWEEN 730 AND 745;
INSERT INTO mangos_string (entry, content_default) VALUES
DELETE FROM trinity_string WHERE entry IN (711,712);
DELETE FROM trinity_string WHERE entry BETWEEN 730 AND 745;
INSERT INTO trinity_string (entry, content_default) VALUES
(711,'Your group is too large for this battleground. Please regroup to join.'),
(712,'Your group is too large for this arena. Please regroup to join.'),
(730,'Your group has members not in your arena team. Please regroup to join.'),
+3 -1
View File
@@ -69,7 +69,9 @@ CREATE TABLE `IRC_AutoAnnounce` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='IRC Module System';
-- Add ircpm command.
delete from `command` WHERE `name`='ircpm';
insert into `command` (`name`, `security`, `help`) values ('ircpm', 0, 'Syntax: .ircpm <user> <text>\n\nSends a PM with <text> to <user> on IRC.');
-- Add auto announce string.
insert into `mangos_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) values('746','|cffff0000[Automatic]:|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
DELETE FROM `trinity_string` WHERE `entry`=746;
insert into `trinity_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) values('746','|cffff0000[Automatic]:|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+13
View File
@@ -0,0 +1,13 @@
CREATE TABLE `game_event_save` (
`event_id` mediumint(8) unsigned NOT NULL,
`state` tinyint(3) unsigned NOT NULL default '1',
`next_start` timestamp NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (`event_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `game_event_condition_save` (
`event_id` mediumint(8) unsigned NOT NULL,
`condition_id` mediumint(8) unsigned NOT NULL default '0',
`done` float default '0',
PRIMARY KEY (`event_id`,`condition_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+68
View File
@@ -0,0 +1,68 @@
ALTER TABLE game_event ADD COLUMN world_event tinyint(3) unsigned not null default 0 comment '0 if normal event, 1 if world event';
CREATE TABLE `game_event_quest_condition` (
`quest` mediumint(8) unsigned NOT NULL default '0',
`event_id` mediumint(8) unsigned NOT NULL default '0',
`condition_id` mediumint(8) unsigned NOT NULL default '0',
`num` float default '0',
PRIMARY KEY (`quest`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `game_event_condition` (
`event_id` mediumint(8) unsigned NOT NULL default '0',
`condition_id` mediumint(8) unsigned NOT NULL default '0',
`req_num` float default '0',
`max_world_state_field` smallint(5) unsigned NOT NULL default '0',
`done_world_state_field` smallint(5) unsigned NOT NULL default '0',
`description` varchar(25) NOT NULL default '',
PRIMARY KEY (`event_id`,`condition_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `game_event_npcflag` (
`guid` mediumint(8) unsigned NOT NULL default '0',
`event_id` mediumint(8) unsigned NOT NULL default '0',
`npcflag` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`guid`,`event_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `game_event_prerequisite` (
`event_id` mediumint(8) unsigned NOT NULL,
`prerequisite_event` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`event_id`,`prerequisite_event`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `game_event_npc_gossip` (
`guid` int(10) unsigned NOT NULL,
`event_id` mediumint(8) unsigned NOT NULL default '0',
`textid` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (`guid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `game_event_gameobject_quest` (
`id` mediumint(8) unsigned NOT NULL default '0',
`quest` mediumint(8) unsigned NOT NULL default '0',
`event` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`quest`,`event`,`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `game_event_npc_vendor` (
`event` mediumint(8) unsigned NOT NULL default '0',
`guid` mediumint(8) unsigned NOT NULL default '0',
`item` mediumint(8) unsigned NOT NULL default '0',
`maxcount` mediumint(8) unsigned NOT NULL default '0',
`incrtime` mediumint(8) unsigned NOT NULL default '0',
`ExtendedCost` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (`guid`,`item`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
ALTER TABLE game_event_creature_quest DROP PRIMARY KEY, ADD PRIMARY KEY (quest, event, id);
ALTER TABLE game_event_creature DROP PRIMARY KEY, ADD PRIMARY KEY (guid, event);
ALTER TABLE game_event_gameobject DROP PRIMARY KEY, ADD PRIMARY KEY (guid, event);
DELETE FROM `command` WHERE `name` LIKE 'debug threatlist';
DELETE FROM `command` WHERE `name` LIKE 'debug hostilrefs';
INSERT INTO `command` VALUES
('debug threatlist', 3, 'Syntax: .debug threatlist\n\n Prints out the current threatlist of the targetted creature.'),
('debug hostilrefs', 3, 'Syntax: .debug hostilrefs\n\n Prints out the hostil refs of the targetted unit.');
@@ -0,0 +1 @@
ALTER TABLE `mangos_string` RENAME TO `trinity_string`;
+65 -9
View File
@@ -159,7 +159,7 @@ CREATE TABLE `command` (
/*Data for the table `command` */
insert into `command`(`name`,`security`,`help`) values ('acct',0,'Syntax: .acct\r\n\r\nDisplay the access level of your account.'),('additem',3,'Syntax: .additem #itemid/[#itemname]/#shift-click-item-link #itemcount\r\n\r\nAdds the specified number of items of id #itemid (or exact (!) name $itemname in brackets, or link created by shift-click at item in inventory or recipe) to your or selected character inventory. If #itemcount is omitted, only one item will be added.\r\n.'),('additemset',3,'Syntax: .additemset #itemsetid\r\n\r\nAdd items from itemset of id #itemsetid to your or selected character inventory. Will add by one example each item from itemset.'),('addmove',2,'Syntax: .addmove #creature_guid [#waittime]\r\n\r\nAdd your current location as a waypoint for creature with guid #creature_guid. And optional add wait time.'),('announce',1,'Syntax: .announce $MessageToBroadcast\r\n\r\nSend a global message to all players online in chat log.'),('aura',3,'Syntax: .aura #spellid\r\n\r\nAdd the aura from spell #spellid to the selected Unit.'),('ban',3,'Syntax is: ban <account|ip|character> $NameOrIp $bantime $reason\r\nBan account or IP and kick player.\r\n$bantime: negative value leads to permban, otherwise use a timestring like \"4d20h3s\".'),('baninfo',3,'Syntax is: baninfo <account|ip|character>\r\nWatch full information about a specific ban.'),('bank',3,'Syntax: .bank\r\n\r\nShow your bank inventory.'),('banlist',3,'Syntax is: banlist <account|ip|character> $NameOrIp\r\nsearches the banlist for a pattern.'),('cast',3,'Syntax: .cast #spellid [triggered]\r\n Cast #spellid to selected target. If no target selected cast to self. If \'trigered\' or part provided then spell casted with triggered flag.'),('cast back',3,'Syntax: .cast back #spellid [triggered]\r\n Selected target will cast #spellid to your character. If \'trigered\' or part provided then spell casted with triggered flag.'),('cast dist',3,'Syntax: .cast dist #spellid [#dist [triggered]]\r\n You will cast spell to pint at distance #dist. If \'trigered\' or part provided then spell casted with triggered flag. Not all spells can be casted as area spells.'),('cast self',3,'Syntax: .cast self #spellid [triggered]\r\nCast #spellid by target at target itself. If \'trigered\' or part provided then spell casted with triggered flag.'),('cast target',3,'Syntax: .cast target #spellid [triggered]\r\n Selected target will cast #spellid to his victim. If \'trigered\' or part provided then spell casted with triggered flag.'),('combatstop',2,'Syntax: .combatstop [$playername]\r\nStop combat for selected character. If selected non-player then command applied to self. If $playername provided then attempt applied to online player $playername.'),('commands',0,'Syntax: .commands\r\n\r\nDisplay a list of available commands for your account level.'),('cooldown',3,'Syntax: .cooldown [#spell_id]\r\n\r\nRemove all (if spell_id not provided) or #spel_id spell cooldown from selected character or you (if no selection).'),('damage',3,'Syntax: .damage $damage_amount [$school [$spellid]]\r\n\r\nApply $damage to target. If not $school and $spellid provided then this flat clean melee damage without any modifiers. If $school provided then damage modified by armor reduction (if school physical), and target absorbing modifiers and result applied as melee damage to target. If spell provided then damage modified and applied as spell damage. $spellid can be shift-link.'),('debug anim',2,'Syntax: .debug anim #emoteid\r\n\r\nPlay emote #emoteid for your character.'),('debug getvalue',3,'Syntax: .debug getvalue #field #isInt\r\n\r\nGet the field #field of the selected creature. If no creature is selected, get the content of your field.\r\n\r\nUse a #isInt of value 1 if the expected field content is an integer.'),('debug playsound',1,'Syntax: .debug playsound #soundid\r\n\r\nPlay sound with #soundid.\r\nSound will be play only for you. Other players do not hear this.\r\nWarning: client may have more 5000 sounds...'),('debug setvalue',3,'Syntax: .debug setvalue #field #value #isInt\r\n\r\nSet the field #field of the selected creature with value #value. If no creature is selected, set the content of your field.\r\n\r\nUse a #isInt of value 1 if #value is an integer.'),('debug standstate',2,'Syntax: .debug standstate #emoteid\r\n\r\nChange the emote of your character while standing to #emoteid.'),('debug update',3,'Syntax: .debug update #field #value\r\n\r\nUpdate the field #field of the selected character or creature with value #value.\r\n\r\nIf no #value is provided, display the content of field #field.'),('flusharenapoints',3,'Syntax: .flusharenapoints\r\n\r\nUse it to distribute arena points based on arena team ratings, and start a new week.'),('delticket',2,'Syntax: .delticket all\r\n .delticket #num\r\n .delticket $character_name\r\n\rall to dalete all tickets at server, $character_name to delete ticket of this character, #num to delete ticket #num.'),('demorph',2,'SyLine truncated
insert into `command`(`name`,`security`,`help`) values ('acct',0,'Syntax: .acct\r\n\r\nDisplay the access level of your account.'),('additem',3,'Syntax: .additem #itemid/[#itemname]/#shift-click-item-link #itemcount\r\n\r\nAdds the specified number of items of id #itemid (or exact (!) name $itemname in brackets, or link created by shift-click at item in inventory or recipe) to your or selected character inventory. If #itemcount is omitted, only one item will be added.\r\n.'),('additemset',3,'Syntax: .additemset #itemsetid\r\n\r\nAdd items from itemset of id #itemsetid to your or selected character inventory. Will add by one example each item from itemset.'),('addmove',2,'Syntax: .addmove #creature_guid [#waittime]\r\n\r\nAdd your current location as a waypoint for creature with guid #creature_guid. And optional add wait time.'),('announce',1,'Syntax: .announce $MessageToBroadcast\r\n\r\nSend a global message to all players online in chat log.'),('aura',3,'Syntax: .aura #spellid\r\n\r\nAdd the aura from spell #spellid to the selected Unit.'),('ban',3,'Syntax is: ban <account|ip|character> $NameOrIp $bantime $reason\r\nBan account or IP and kick player.\r\n$bantime: negative value leads to permban, otherwise use a timestring like \"4d20h3s\".'),('baninfo',3,'Syntax is: baninfo <account|ip|character>\r\nWatch full information about a specific ban.'),('bank',3,'Syntax: .bank\r\n\r\nShow your bank inventory.'),('banlist',3,'Syntax is: banlist <account|ip|character> $NameOrIp\r\nsearches the banlist for a pattern.'),('cast',3,'Syntax: .cast #spellid [triggered]\r\n Cast #spellid to selected target. If no target selected cast to self. If \'trigered\' or part provided then spell casted with triggered flag.'),('cast back',3,'Syntax: .cast back #spellid [triggered]\r\n Selected target will cast #spellid to your character. If \'trigered\' or part provided then spell casted with triggered flag.'),('cast dist',3,'Syntax: .cast dist #spellid [#dist [triggered]]\r\n You will cast spell to pint at distance #dist. If \'trigered\' or part provided then spell casted with triggered flag. Not all spells can be casted as area spells.'),('cast self',3,'Syntax: .cast self #spellid [triggered]\r\nCast #spellid by target at target itself. If \'trigered\' or part provided then spell casted with triggered flag.'),('cast target',3,'Syntax: .cast target #spellid [triggered]\r\n Selected target will cast #spellid to his victim. If \'trigered\' or part provided then spell casted with triggered flag.'),('combatstop',2,'Syntax: .combatstop [$playername]\r\nStop combat for selected character. If selected non-player then command applied to self. If $playername provided then attempt applied to online player $playername.'),('commands',0,'Syntax: .commands\r\n\r\nDisplay a list of available commands for your account level.'),('cooldown',3,'Syntax: .cooldown [#spell_id]\r\n\r\nRemove all (if spell_id not provided) or #spel_id spell cooldown from selected character or you (if no selection).'),('damage',3,'Syntax: .damage $damage_amount [$school [$spellid]]\r\n\r\nApply $damage to target. If not $school and $spellid provided then this flat clean melee damage without any modifiers. If $school provided then damage modified by armor reduction (if school physical), and target absorbing modifiers and result applied as melee damage to target. If spell provided then damage modified and applied as spell damage. $spellid can be shift-link.'),('debug anim',2,'Syntax: .debug anim #emoteid\r\n\r\nPlay emote #emoteid for your character.'),('debug getvalue',3,'Syntax: .debug getvalue #field #isInt\r\n\r\nGet the field #field of the selected creature. If no creature is selected, get the content of your field.\r\n\r\nUse a #isInt of value 1 if the expected field content is an integer.'),('debug playsound',1,'Syntax: .debug playsound #soundid\r\n\r\nPlay sound with #soundid.\r\nSound will be play only for you. Other players do not hear this.\r\nWarning: client may have more 5000 sounds...'),('debug setvalue',3,'Syntax: .debug setvalue #field #value #isInt\r\n\r\nSet the field #field of the selected creature with value #value. If no creature is selected, set the content of your field.\r\n\r\nUse a #isInt of value 1 if #value is an integer.'),('debug standstate',2,'Syntax: .debug standstate #emoteid\r\n\r\nChange the emote of your character while standing to #emoteid.'),('debug update',3,'Syntax: .debug update #field #value\r\n\r\nUpdate the field #field of the selected character or creature with value #value.\r\n\r\nIf no #value is provided, display the content of field #field.'),('flusharenapoints',3,'Syntax: .flusharenapoints\r\n\r\nUse it to distribute arena points based on arena team ratings, and start a new week.'),('delticket',2,'Syntax: .delticket all\r\n .delticket #num\r\n .delticket $character_name\r\n\rall to dalete all tickets at server, $character_name to delete ticket of this character, #num to delete ticket #num.'),('demorph',2,'SyLine truncated
/*Table structure for table `creature` */
@@ -536,6 +536,7 @@ CREATE TABLE `game_event` (
`occurence` bigint(20) unsigned NOT NULL default '86400' COMMENT 'Delay in hours between occurences of the event',
`length` bigint(20) unsigned NOT NULL default '43200' COMMENT 'Length in hours of the event',
`description` varchar(255) default NULL COMMENT 'Description of the event displayed in console',
`world_event` tinyint(3) unsigned not null default '0' COMMENT '0 if normal event, 1 if world event';
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
@@ -548,7 +549,7 @@ DROP TABLE IF EXISTS `game_event_creature`;
CREATE TABLE `game_event_creature` (
`guid` int(10) unsigned NOT NULL,
`event` smallint(6) NOT NULL default '0' COMMENT 'Put negatives values to remove during event',
PRIMARY KEY (`guid`)
PRIMARY KEY (`guid`,`event`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*Data for the table `game_event_creature` */
@@ -561,11 +562,66 @@ CREATE TABLE `game_event_creature_quest` (
`id` mediumint(8) unsigned NOT NULL default '0',
`quest` mediumint(8) unsigned NOT NULL default '0',
`event` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`id`,`quest`)
PRIMARY KEY (`quest`,`event`,`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*Data for the table `game_event_creature_quest` */
CREATE TABLE `game_event_quest_condition` (
`quest` mediumint(8) unsigned NOT NULL default '0',
`event_id` mediumint(8) unsigned NOT NULL default '0',
`condition_id` mediumint(8) unsigned NOT NULL default '0',
`num` float default '0',
PRIMARY KEY (`quest`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `game_event_condition` (
`event_id` mediumint(8) unsigned NOT NULL default '0',
`condition_id` mediumint(8) unsigned NOT NULL default '0',
`req_num` float default '0',
`max_world_state_field` smallint(5) unsigned NOT NULL default '0',
`done_world_state_field` smallint(5) unsigned NOT NULL default '0',
`description` varchar(25) NOT NULL default '',
PRIMARY KEY (`event_id`,`condition_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `game_event_npcflag` (
`guid` mediumint(8) unsigned NOT NULL default '0',
`event_id` mediumint(8) unsigned NOT NULL default '0',
`npcflag` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`guid`,`event_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `game_event_prerequisite` (
`event_id` mediumint(8) unsigned NOT NULL,
`prerequisite_event` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`event_id`,`prerequisite_event`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `game_event_npc_gossip` (
`guid` int(10) unsigned NOT NULL,
`event_id` mediumint(8) unsigned NOT NULL default '0',
`textid` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (`guid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `game_event_gameobject_quest` (
`id` mediumint(8) unsigned NOT NULL default '0',
`quest` mediumint(8) unsigned NOT NULL default '0',
`event` smallint(5) unsigned NOT NULL default '0',
PRIMARY KEY (`quest`,`event`,`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `game_event_npc_vendor` (
`event` mediumint(8) unsigned NOT NULL default '0',
`guid` mediumint(8) unsigned NOT NULL default '0',
`item` mediumint(8) unsigned NOT NULL default '0',
`maxcount` mediumint(8) unsigned NOT NULL default '0',
`incrtime` mediumint(8) unsigned NOT NULL default '0',
`ExtendedCost` mediumint(8) unsigned NOT NULL default '0',
PRIMARY KEY (`guid`,`item`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*Table structure for table `game_event_gameobject` */
DROP TABLE IF EXISTS `game_event_gameobject`;
@@ -573,7 +629,7 @@ DROP TABLE IF EXISTS `game_event_gameobject`;
CREATE TABLE `game_event_gameobject` (
`guid` int(10) unsigned NOT NULL,
`event` smallint(6) NOT NULL default '0' COMMENT 'Put negatives values to remove during event',
PRIMARY KEY (`guid`)
PRIMARY KEY (`guid`,`event`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*Data for the table `game_event_gameobject` */
@@ -1327,11 +1383,11 @@ CREATE TABLE `locales_quest` (
/*Data for the table `locales_quest` */
/*Table structure for table `mangos_string` */
/*Table structure for table `trinity_string` */
DROP TABLE IF EXISTS `mangos_string`;
DROP TABLE IF EXISTS `trinity_string`;
CREATE TABLE `mangos_string` (
CREATE TABLE `trinity_string` (
`entry` mediumint(8) unsigned NOT NULL default '0',
`content_default` text NOT NULL,
`content_loc1` text,
@@ -1345,9 +1401,9 @@ CREATE TABLE `mangos_string` (
PRIMARY KEY (`entry`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*Data for the table `mangos_string` */
/*Data for the table `trinity_string` */
insert into `mangos_string`(`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`) values (1,'You should select a character or a creature.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,'You should select a creature.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,'|cffff0000[System Message]: %s|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,'|cffff0000[Event Message]: %s|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(5,'There is no help for that command',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(6,'There is no such command',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(7,'There is no such subcommand',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(8,'Command %s have subcommands:%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(9,'Commands available to you:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(10,'Incorrect syntax.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(11,'Your account level is: %i',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(12,'Online players: %u (max: %u) Queued players: %u (max: %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(13,'Server uptime: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(14,'Player saved.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(15,'All players saved.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(16,'There are the following active GMs on this server:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(17,'There are no GMs currently logged in on this server.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(18,'Cannot do that while flying.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(19,'Cannot do that in Battlegrounds.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(20,'Target is flying you can\'t do that.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(21,'%s is flying command failed.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(22,'You are not mounted so you can\'t dismount.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(23,'Cannot do that while fighting.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(24,'You used it recently.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(25,'Your password can\'t be longer than 16 characters (client limit), password not changed!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(26,'The password was changed',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(27,'The new passwords do not match or the old password is wrong',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(28,'Your account is now locked.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(29,'Your account is now unlocked.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(30,', rank ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(31,' [known]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(32,' [learn]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(33,' [passive]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(34,' [talent]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(35,' [active]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(36,' [complete]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(37,' (offline)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(38,'on',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(39,'off',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(40,'You are: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(41,'visible',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(42,'invisible',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(43,'done',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(44,'You',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(45,' <unknown> ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(46,'<error>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(47,'<non-existing character>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(48,'UNKNOWN',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(49,'You must be at least level %u to enter.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(50,'You must be at least level %u and have item %s to enter.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(51,'Hello! Ready for some training?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(52,'Invaid item count (%u) for item %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(53,'Mail can\'t have more %u item stacks',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(100,'Global notify: ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(101,'Map: %u (%s) Zone: %u (%s) Area: %u (%s)\nX: %f Y: %f Z: %f Orientation: %f\ngrid[%u,%u]cell[%u,%u] InstanceID: %u\n ZoneX: %f ZoneY: %f\nGroundZ: %f FloorZ: %f Have height data (Map: %u VMap: %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(102,'%s is already being teleported.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(103,'You can summon a player to your instance only if he is in your party with you as leader.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(104,'You cannot go to the player\'s instance because you are in a party now.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(105,'You can go to the player\'s instance while not being in his party only if your GM mode is on.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(106,'You can not go to player %s from instance to instance.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(107,'You can not summon player %s from instance to instance.',NULine truncated
insert into `trinity_string`(`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`) values (1,'You should select a character or a creature.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,'You should select a creature.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,'|cffff0000[System Message]: %s|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,'|cffff0000[Event Message]: %s|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(5,'There is no help for that command',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(6,'There is no such command',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(7,'There is no such subcommand',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(8,'Command %s have subcommands:%s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(9,'Commands available to you:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(10,'Incorrect syntax.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(11,'Your account level is: %i',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(12,'Online players: %u (max: %u) Queued players: %u (max: %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(13,'Server uptime: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(14,'Player saved.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(15,'All players saved.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(16,'There are the following active GMs on this server:',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(17,'There are no GMs currently logged in on this server.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(18,'Cannot do that while flying.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(19,'Cannot do that in Battlegrounds.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(20,'Target is flying you can\'t do that.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(21,'%s is flying command failed.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(22,'You are not mounted so you can\'t dismount.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(23,'Cannot do that while fighting.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(24,'You used it recently.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(25,'Your password can\'t be longer than 16 characters (client limit), password not changed!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(26,'The password was changed',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(27,'The new passwords do not match or the old password is wrong',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(28,'Your account is now locked.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(29,'Your account is now unlocked.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(30,', rank ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(31,' [known]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(32,' [learn]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(33,' [passive]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(34,' [talent]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(35,' [active]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(36,' [complete]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(37,' (offline)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(38,'on',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(39,'off',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(40,'You are: %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(41,'visible',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(42,'invisible',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(43,'done',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(44,'You',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(45,' <unknown> ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(46,'<error>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(47,'<non-existing character>',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(48,'UNKNOWN',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(49,'You must be at least level %u to enter.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(50,'You must be at least level %u and have item %s to enter.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(51,'Hello! Ready for some training?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(52,'Invaid item count (%u) for item %u',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(53,'Mail can\'t have more %u item stacks',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(100,'Global notify: ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(101,'Map: %u (%s) Zone: %u (%s) Area: %u (%s)\nX: %f Y: %f Z: %f Orientation: %f\ngrid[%u,%u]cell[%u,%u] InstanceID: %u\n ZoneX: %f ZoneY: %f\nGroundZ: %f FloorZ: %f Have height data (Map: %u VMap: %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(102,'%s is already being teleported.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(103,'You can summon a player to your instance only if he is in your party with you as leader.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(104,'You cannot go to the player\'s instance because you are in a party now.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(105,'You can go to the player\'s instance while not being in his party only if your GM mode is on.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(106,'You can not go to player %s from instance to instance.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(107,'You can not summon player %s from instance to instance.',NLine truncated
/*Table structure for table `npc_gossip` */
+1 -1
View File
@@ -4,7 +4,7 @@
#
# 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 3 of the License, or
# 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,
+1 -1
View File
@@ -4,7 +4,7 @@
#
# 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 3 of the License, or
# 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,
+2 -1
View File
@@ -4,7 +4,7 @@
#
# 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 3 of the License, or
# 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,
@@ -52,3 +52,4 @@ libtrinityscript_la_LIBADD = $(MYSQL_LIBS) $(POSTGRE_LIBS)
EXTRA_DIST = \
Readme.txt
+26 -24
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
@@ -34,7 +36,7 @@ int num_inst_scripts;
extern void AddSC_default();
// -------------------
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
void ScriptsFree()
{ // Free resources before library unload
for(int i=0;i<nrscripts;i++)
@@ -47,7 +49,7 @@ void ScriptsFree()
num_inst_scripts = 0;
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
void ScriptsInit()
{
nrscripts = 0;
@@ -76,7 +78,7 @@ Script* GetScriptByName(std::string Name)
return NULL;
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool GossipHello ( Player * player, Creature *_Creature )
{
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
@@ -86,7 +88,7 @@ bool GossipHello ( Player * player, Creature *_Creature )
return tmpscript->pGossipHello(player,_Creature);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool GossipSelect( Player *player, Creature *_Creature,uint32 sender, uint32 action )
{
debug_log("DEBUG: Gossip selection, sender: %d, action: %d",sender, action);
@@ -98,7 +100,7 @@ bool GossipSelect( Player *player, Creature *_Creature,uint32 sender, uint32 act
return tmpscript->pGossipSelect(player,_Creature,sender,action);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool GossipSelectWithCode( Player *player, Creature *_Creature, uint32 sender, uint32 action, const char* sCode )
{
debug_log("DEBUG: Gossip selection, sender: %d, action: %d",sender, action);
@@ -110,7 +112,7 @@ bool GossipSelectWithCode( Player *player, Creature *_Creature, uint32 sender, u
return tmpscript->pGossipSelectWithCode(player,_Creature,sender,action,sCode);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool QuestAccept( Player *player, Creature *_Creature, Quest *_Quest )
{
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
@@ -120,7 +122,7 @@ bool QuestAccept( Player *player, Creature *_Creature, Quest *_Quest )
return tmpscript->pQuestAccept(player,_Creature,_Quest);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool QuestSelect( Player *player, Creature *_Creature, Quest *_Quest )
{
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
@@ -130,7 +132,7 @@ bool QuestSelect( Player *player, Creature *_Creature, Quest *_Quest )
return tmpscript->pQuestSelect(player,_Creature,_Quest);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool QuestComplete( Player *player, Creature *_Creature, Quest *_Quest )
{
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
@@ -140,7 +142,7 @@ bool QuestComplete( Player *player, Creature *_Creature, Quest *_Quest )
return tmpscript->pQuestComplete(player,_Creature,_Quest);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool ChooseReward( Player *player, Creature *_Creature, Quest *_Quest, uint32 opt )
{
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
@@ -150,7 +152,7 @@ bool ChooseReward( Player *player, Creature *_Creature, Quest *_Quest, uint32 op
return tmpscript->pChooseReward(player,_Creature,_Quest,opt);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
uint32 NPCDialogStatus( Player *player, Creature *_Creature )
{
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
@@ -160,7 +162,7 @@ uint32 NPCDialogStatus( Player *player, Creature *_Creature )
return tmpscript->pNPCDialogStatus(player,_Creature);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
uint32 GODialogStatus( Player *player, GameObject *_GO )
{
Script *tmpscript = NULL;
@@ -172,7 +174,7 @@ uint32 GODialogStatus( Player *player, GameObject *_GO )
return tmpscript->pGODialogStatus(player,_GO);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool ItemHello( Player *player, Item *_Item, Quest *_Quest )
{
Script *tmpscript = NULL;
@@ -184,7 +186,7 @@ bool ItemHello( Player *player, Item *_Item, Quest *_Quest )
return tmpscript->pItemHello(player,_Item,_Quest);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool ItemQuestAccept( Player *player, Item *_Item, Quest *_Quest )
{
Script *tmpscript = NULL;
@@ -196,7 +198,7 @@ bool ItemQuestAccept( Player *player, Item *_Item, Quest *_Quest )
return tmpscript->pItemQuestAccept(player,_Item,_Quest);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool GOHello( Player *player, GameObject *_GO )
{
Script *tmpscript = NULL;
@@ -208,7 +210,7 @@ bool GOHello( Player *player, GameObject *_GO )
return tmpscript->pGOHello(player,_GO);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool GOQuestAccept( Player *player, GameObject *_GO, Quest *_Quest )
{
Script *tmpscript = NULL;
@@ -220,7 +222,7 @@ bool GOQuestAccept( Player *player, GameObject *_GO, Quest *_Quest )
return tmpscript->pGOQuestAccept(player,_GO,_Quest);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool GOChooseReward( Player *player, GameObject *_GO, Quest *_Quest, uint32 opt )
{
Script *tmpscript = NULL;
@@ -232,7 +234,7 @@ bool GOChooseReward( Player *player, GameObject *_GO, Quest *_Quest, uint32 opt
return tmpscript->pGOChooseReward(player,_GO,_Quest,opt);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool AreaTrigger ( Player *player, AreaTriggerEntry* atEntry )
{
Script *tmpscript = NULL;
@@ -243,7 +245,7 @@ bool AreaTrigger ( Player *player, AreaTriggerEntry* atEntry )
return tmpscript->pAreaTrigger(player, atEntry);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool ReceiveEmote ( Player *player, Creature *_Creature, uint32 emote )
{
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
@@ -252,7 +254,7 @@ bool ReceiveEmote ( Player *player, Creature *_Creature, uint32 emote )
return tmpscript->pReceiveEmote(player,_Creature, emote);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool ItemUse( Player *player, Item* _Item, SpellCastTargets const& targets)
{
Script *tmpscript = NULL;
@@ -263,7 +265,7 @@ bool ItemUse( Player *player, Item* _Item, SpellCastTargets const& targets)
return tmpscript->pItemUse(player,_Item,targets);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
CreatureAI* GetAI(Creature *_Creature )
{
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
@@ -272,7 +274,7 @@ CreatureAI* GetAI(Creature *_Creature )
return tmpscript->GetAI(_Creature);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
InstanceData* CreateInstanceData(Map *map)
{
if(!map->IsDungeon()) return NULL;
+6 -4
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef SCRIPTMGR_H
@@ -86,7 +88,7 @@ extern int num_inst_scripts;
#define VISIBLE_RANGE (50.0f)
struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI
struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
{
ScriptedAI(Creature* creature) : m_creature(creature) {}
~ScriptedAI() {}
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "sc_defines.h"
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "sc_defines.h"
+5 -3
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef SC_DEFINES_H
+8 -6
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef CONFIG_H
@@ -23,9 +25,9 @@
#ifdef WIN32
//#include <windows.h>
#define MANGOS_DLL_EXPORT extern "C" __declspec(dllexport)
#define TRINITY_DLL_EXPORT extern "C" __declspec(dllexport)
#elif defined( __GNUC__ )
#define MANGOS_DLL_EXPORT extern "C"
#define TRINITY_DLL_EXPORT extern "C"
#else
#define MANGOS_DLL_EXPORT extern "C" export
#define TRINITY_DLL_EXPORT extern "C" export
#endif
+5 -3
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifdef WIN32
+2 -1
View File
@@ -4,7 +4,7 @@
#
# 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 3 of the License, or
# 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,
@@ -415,3 +415,4 @@ install-data-hook:
done
+23 -23
View File
@@ -633,7 +633,7 @@ void LoadDatabase()
// Load Script Text
outstring_log("TSCR: Loading Script Texts...");
LoadMangosStrings(TScriptDB,"script_texts",TEXT_SOURCE_RANGE,(TEXT_SOURCE_RANGE*2)+1);
LoadTrinityStrings(TScriptDB,"script_texts",TEXT_SOURCE_RANGE,(TEXT_SOURCE_RANGE*2)+1);
// Gather Additional data from Script Texts
result = TScriptDB.PQuery("SELECT entry, sound, type, language FROM script_texts");
@@ -697,7 +697,7 @@ void LoadDatabase()
// Load Custom Text
outstring_log("TSCR: Loading Custom Texts...");
LoadMangosStrings(TScriptDB,"custom_texts",TEXT_SOURCE_RANGE*2,(TEXT_SOURCE_RANGE*3)+1);
LoadTrinityStrings(TScriptDB,"custom_texts",TEXT_SOURCE_RANGE*2,(TEXT_SOURCE_RANGE*3)+1);
// Gather Additional data from Custom Texts
result = TScriptDB.PQuery("SELECT entry, sound, type, language FROM custom_texts");
@@ -1174,7 +1174,7 @@ struct TSpellSummary {
uint8 Effects; // set of enum SelectEffect
}extern *SpellSummary;
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
void ScriptsFree()
{
// Free Spell Summary
@@ -1187,7 +1187,7 @@ void ScriptsFree()
nrscripts = 0;
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
void ScriptsInit()
{
bool CanLoadDB = true;
@@ -1931,7 +1931,7 @@ Script* GetScriptByName(std::string Name)
//********************************
//*** Functions to be Exported ***
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool GossipHello ( Player * player, Creature *_Creature )
{
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
@@ -1941,7 +1941,7 @@ bool GossipHello ( Player * player, Creature *_Creature )
return tmpscript->pGossipHello(player,_Creature);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool GossipSelect( Player *player, Creature *_Creature, uint32 sender, uint32 action )
{
debug_log("TSCR: Gossip selection, sender: %d, action: %d",sender, action);
@@ -1953,7 +1953,7 @@ bool GossipSelect( Player *player, Creature *_Creature, uint32 sender, uint32 ac
return tmpscript->pGossipSelect(player,_Creature,sender,action);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool GossipSelectWithCode( Player *player, Creature *_Creature, uint32 sender, uint32 action, const char* sCode )
{
debug_log("TSCR: Gossip selection with code, sender: %d, action: %d",sender, action);
@@ -1965,7 +1965,7 @@ bool GossipSelectWithCode( Player *player, Creature *_Creature, uint32 sender, u
return tmpscript->pGossipSelectWithCode(player,_Creature,sender,action,sCode);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool QuestAccept( Player *player, Creature *_Creature, Quest const *_Quest )
{
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
@@ -1975,7 +1975,7 @@ bool QuestAccept( Player *player, Creature *_Creature, Quest const *_Quest )
return tmpscript->pQuestAccept(player,_Creature,_Quest);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool QuestSelect( Player *player, Creature *_Creature, Quest const *_Quest )
{
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
@@ -1985,7 +1985,7 @@ bool QuestSelect( Player *player, Creature *_Creature, Quest const *_Quest )
return tmpscript->pQuestSelect(player,_Creature,_Quest);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool QuestComplete( Player *player, Creature *_Creature, Quest const *_Quest )
{
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
@@ -1995,7 +1995,7 @@ bool QuestComplete( Player *player, Creature *_Creature, Quest const *_Quest )
return tmpscript->pQuestComplete(player,_Creature,_Quest);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool ChooseReward( Player *player, Creature *_Creature, Quest const *_Quest, uint32 opt )
{
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
@@ -2005,7 +2005,7 @@ bool ChooseReward( Player *player, Creature *_Creature, Quest const *_Quest, uin
return tmpscript->pChooseReward(player,_Creature,_Quest,opt);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
uint32 NPCDialogStatus( Player *player, Creature *_Creature )
{
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
@@ -2015,7 +2015,7 @@ uint32 NPCDialogStatus( Player *player, Creature *_Creature )
return tmpscript->pNPCDialogStatus(player,_Creature);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
uint32 GODialogStatus( Player *player, GameObject *_GO )
{
Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName);
@@ -2025,7 +2025,7 @@ uint32 GODialogStatus( Player *player, GameObject *_GO )
return tmpscript->pGODialogStatus(player,_GO);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool ItemHello( Player *player, Item *_Item, Quest const *_Quest )
{
Script *tmpscript = GetScriptByName(_Item->GetProto()->ScriptName);
@@ -2035,7 +2035,7 @@ bool ItemHello( Player *player, Item *_Item, Quest const *_Quest )
return tmpscript->pItemHello(player,_Item,_Quest);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool ItemQuestAccept( Player *player, Item *_Item, Quest const *_Quest )
{
Script *tmpscript = GetScriptByName(_Item->GetProto()->ScriptName);
@@ -2045,7 +2045,7 @@ bool ItemQuestAccept( Player *player, Item *_Item, Quest const *_Quest )
return tmpscript->pItemQuestAccept(player,_Item,_Quest);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool GOHello( Player *player, GameObject *_GO )
{
Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName);
@@ -2055,7 +2055,7 @@ bool GOHello( Player *player, GameObject *_GO )
return tmpscript->pGOHello(player,_GO);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool GOQuestAccept( Player *player, GameObject *_GO, Quest const *_Quest )
{
Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName);
@@ -2065,7 +2065,7 @@ bool GOQuestAccept( Player *player, GameObject *_GO, Quest const *_Quest )
return tmpscript->pGOQuestAccept(player,_GO,_Quest);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool GOChooseReward( Player *player, GameObject *_GO, Quest const *_Quest, uint32 opt )
{
Script *tmpscript = GetScriptByName(_GO->GetGOInfo()->ScriptName);
@@ -2075,7 +2075,7 @@ bool GOChooseReward( Player *player, GameObject *_GO, Quest const *_Quest, uint3
return tmpscript->pGOChooseReward(player,_GO,_Quest,opt);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool AreaTrigger( Player *player, AreaTriggerEntry * atEntry)
{
Script *tmpscript = NULL;
@@ -2086,7 +2086,7 @@ bool AreaTrigger( Player *player, AreaTriggerEntry * atEntry)
return tmpscript->pAreaTrigger(player, atEntry);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
CreatureAI* GetAI(Creature *_Creature)
{
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
@@ -2095,7 +2095,7 @@ CreatureAI* GetAI(Creature *_Creature)
return tmpscript->GetAI(_Creature);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool ItemUse( Player *player, Item* _Item, SpellCastTargets const& targets)
{
Script *tmpscript = GetScriptByName(_Item->GetProto()->ScriptName);
@@ -2104,7 +2104,7 @@ bool ItemUse( Player *player, Item* _Item, SpellCastTargets const& targets)
return tmpscript->pItemUse(player,_Item,targets);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
bool ReceiveEmote( Player *player, Creature *_Creature, uint32 emote )
{
Script *tmpscript = GetScriptByName(_Creature->GetScriptName());
@@ -2113,7 +2113,7 @@ bool ReceiveEmote( Player *player, Creature *_Creature, uint32 emote )
return tmpscript->pReceiveEmote(player, _Creature, emote);
}
MANGOS_DLL_EXPORT
TRINITY_DLL_EXPORT
InstanceData* CreateInstanceData(Map *map)
{
Script *tmpscript = NULL;
+7 -4
View File
@@ -1,4 +1,7 @@
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
/* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software licensed under GPL version 2
* Please see the included DOCS/LICENSE.TXT for more information */
@@ -78,11 +81,11 @@ void DoScriptText(int32 textEntry, WorldObject* pSource, Unit* target = NULL);
#endif
#ifdef WIN32
#define MANGOS_DLL_EXPORT extern "C" __declspec(dllexport)
#define TRINITY_DLL_EXPORT extern "C" __declspec(dllexport)
#elif defined( __GNUC__ )
#define MANGOS_DLL_EXPORT extern "C"
#define TRINITY_DLL_EXPORT extern "C"
#else
#define MANGOS_DLL_EXPORT extern "C" export
#define TRINITY_DLL_EXPORT extern "C" export
#endif
#endif
+16 -13
View File
@@ -1,4 +1,7 @@
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
/* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software licensed under GPL version 2
* Please see the included DOCS/LICENSE.TXT for more information */
@@ -506,21 +509,21 @@ void ScriptedAI::DoTeleportPlayer(Unit* pUnit, float x, float y, float z, float
Unit* ScriptedAI::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff)
{
CellPair p(MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
CellPair p(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Unit* pUnit = NULL;
MaNGOS::MostHPMissingInRange u_check(m_creature, range, MinHPDiff);
MaNGOS::UnitLastSearcher<MaNGOS::MostHPMissingInRange> searcher(pUnit, u_check);
Trinity::MostHPMissingInRange u_check(m_creature, range, MinHPDiff);
Trinity::UnitLastSearcher<Trinity::MostHPMissingInRange> searcher(pUnit, u_check);
/*
typedef TYPELIST_4(GameObject, Creature*except pets*, DynamicObject, Corpse*Bones*) AllGridObjectTypes;
This means that if we only search grid then we cannot possibly return pets or players so this is safe
*/
TypeContainerVisitor<MaNGOS::UnitLastSearcher<MaNGOS::MostHPMissingInRange>, GridTypeMapContainer > grid_unit_searcher(searcher);
TypeContainerVisitor<Trinity::UnitLastSearcher<Trinity::MostHPMissingInRange>, GridTypeMapContainer > grid_unit_searcher(searcher);
CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, grid_unit_searcher, *(m_creature->GetMap()));
@@ -529,17 +532,17 @@ Unit* ScriptedAI::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff)
std::list<Creature*> ScriptedAI::DoFindFriendlyCC(float range)
{
CellPair p(MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
CellPair p(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
std::list<Creature*> pList;
MaNGOS::FriendlyCCedInRange u_check(m_creature, range);
MaNGOS::CreatureListSearcher<MaNGOS::FriendlyCCedInRange> searcher(pList, u_check);
Trinity::FriendlyCCedInRange u_check(m_creature, range);
Trinity::CreatureListSearcher<Trinity::FriendlyCCedInRange> searcher(pList, u_check);
TypeContainerVisitor<MaNGOS::CreatureListSearcher<MaNGOS::FriendlyCCedInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::FriendlyCCedInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);
CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, grid_creature_searcher, *(m_creature->GetMap()));
@@ -549,17 +552,17 @@ std::list<Creature*> ScriptedAI::DoFindFriendlyCC(float range)
std::list<Creature*> ScriptedAI::DoFindFriendlyMissingBuff(float range, uint32 spellid)
{
CellPair p(MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
CellPair p(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));
Cell cell(p);
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
std::list<Creature*> pList;
MaNGOS::FriendlyMissingBuffInRange u_check(m_creature, range, spellid);
MaNGOS::CreatureListSearcher<MaNGOS::FriendlyMissingBuffInRange> searcher(pList, u_check);
Trinity::FriendlyMissingBuffInRange u_check(m_creature, range, spellid);
Trinity::CreatureListSearcher<Trinity::FriendlyMissingBuffInRange> searcher(pList, u_check);
TypeContainerVisitor<MaNGOS::CreatureListSearcher<MaNGOS::FriendlyMissingBuffInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);
TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::FriendlyMissingBuffInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);
CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, grid_creature_searcher, *(m_creature->GetMap()));
+7 -4
View File
@@ -1,4 +1,7 @@
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
/* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software licensed under GPL version 2
* Please see the included DOCS/LICENSE.TXT for more information */
@@ -8,7 +11,7 @@
#include "CreatureAI.h"
#include "Creature.h"
struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI
struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI
{
ScriptedAI(Creature* creature) : m_creature(creature), InCombat(false) {}
~ScriptedAI() {}
@@ -26,7 +29,7 @@ struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI
//Called at stoping attack by any attacker
void EnterEvadeMode();
//Called at any heal cast/item used (call non implemented in mangos)
//Called at any heal cast/item used (call non implemented in Trinity)
void HealBy(Unit *healer, uint32 amount_healed) {}
// Called at any Damage to any victim (before damage apply)
@@ -153,7 +156,7 @@ struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI
bool CanCast(Unit* Target, SpellEntry const *Spell, bool Triggered = false);
};
struct MANGOS_DLL_DECL Scripted_NoMovementAI : public ScriptedAI
struct TRINITY_DLL_DECL Scripted_NoMovementAI : public ScriptedAI
{
Scripted_NoMovementAI(Creature* creature) : ScriptedAI(creature) {}
+4 -1
View File
@@ -1,4 +1,7 @@
/* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
/* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* This program is free software licensed under GPL version 2
* Please see the included DOCS/LICENSE.TXT for more information */
+1 -1
View File
@@ -22,7 +22,7 @@ enum EncounterState
#define OUT_LOAD_INST_DATA_COMPLETE debug_log("SD2: Instance Data Load for Instance %s (Map %d, Instance Id: %d) is complete.",instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
#define OUT_LOAD_INST_DATA_FAIL error_log("SD2: Unable to load Instance Data for Instance %s (Map %d, Instance Id: %d).",instance->GetMapName(), instance->GetId(), instance->GetInstanceId())
class MANGOS_DLL_DECL ScriptedInstance : public InstanceData
class TRINITY_DLL_DECL ScriptedInstance : public InstanceData
{
public:
+1 -1
View File
@@ -4,7 +4,7 @@
#
# 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 3 of the License, or
# 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,
+1 -1
View File
@@ -20,7 +20,7 @@
#
# 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 3 of the License, or
# 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,
+5 -3
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "precompiled.h"
+9 -7
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,16 +10,16 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_FACTORY_HOLDER
#define MANGOS_FACTORY_HOLDER
#ifndef TRINITY_FACTORY_HOLDER
#define TRINITY_FACTORY_HOLDER
#include "Platform/Define.h"
#include "Utilities/TypeList.h"
@@ -27,11 +29,11 @@
/** FactoryHolder holds a factory object of a specific type
*/
template<class T, class Key = std::string>
class MANGOS_DLL_DECL FactoryHolder
class TRINITY_DLL_DECL FactoryHolder
{
public:
typedef ObjectRegistry<FactoryHolder<T, Key >, Key > FactoryHolderRegistry;
typedef MaNGOS::Singleton<FactoryHolderRegistry > FactoryHolderRepository;
typedef Trinity::Singleton<FactoryHolderRegistry > FactoryHolderRepository;
FactoryHolder(Key k) : i_key(k) {}
virtual ~FactoryHolder() {}
+9 -7
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,16 +10,16 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_OBJECTREGISTRY_H
#define MANGOS_OBJECTREGISTRY_H
#ifndef TRINITY_OBJECTREGISTRY_H
#define TRINITY_OBJECTREGISTRY_H
#include "Platform/Define.h"
#include "Utilities/HashMap.h"
@@ -29,7 +31,7 @@
/** ObjectRegistry holds all registry item of the same type
*/
template<class T, class Key = std::string>
class MANGOS_DLL_DECL ObjectRegistry
class TRINITY_DLL_DECL ObjectRegistry
{
public:
typedef std::map<Key, T *> RegistryMapType;
@@ -93,7 +95,7 @@ class MANGOS_DLL_DECL ObjectRegistry
private:
RegistryMapType i_registeredObjects;
friend class MaNGOS::OperatorNew<ObjectRegistry<T, Key> >;
friend class Trinity::OperatorNew<ObjectRegistry<T, Key> >;
// protected for friend use since it should be a singleton
ObjectRegistry() {}
+10 -8
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,20 +10,20 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_GRID_H
#define MANGOS_GRID_H
#ifndef TRINITY_GRID_H
#define TRINITY_GRID_H
/*
@class Grid
Grid is a logical segment of the game world represented inside MaNGOS.
Grid is a logical segment of the game world represented inside TrinIty.
Grid is bind at compile time to a particular type of object which
we call it the object of interested. There are many types of loader,
specially, dynamic loader, static loader, or on-demand loader. There's
@@ -43,9 +45,9 @@ template
class ACTIVE_OBJECT,
class WORLD_OBJECT_TYPES,
class GRID_OBJECT_TYPES,
class ThreadModel = MaNGOS::SingleThreaded<ACTIVE_OBJECT>
class ThreadModel = Trinity::SingleThreaded<ACTIVE_OBJECT>
>
class MANGOS_DLL_DECL Grid
class TRINITY_DLL_DECL Grid
{
// allows the GridLoader to access its internals
template<class A, class T, class O> friend class GridLoader;
+8 -6
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,16 +10,16 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_GRIDLOADER_H
#define MANGOS_GRIDLOADER_H
#ifndef TRINITY_GRIDLOADER_H
#define TRINITY_GRIDLOADER_H
/**
@class GridLoader
@@ -40,7 +42,7 @@ class ACTIVE_OBJECT,
class WORLD_OBJECT_TYPES,
class GRID_OBJECT_TYPES
>
class MANGOS_DLL_DECL GridLoader
class TRINITY_DLL_DECL GridLoader
{
public:
+5 -3
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _GRIDREFMANAGER
+6 -4
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _GRIDREFERENCE_H
@@ -25,7 +27,7 @@ template<class OBJECT>
class GridRefManager;
template<class OBJECT>
class MANGOS_DLL_SPEC GridReference : public Reference<GridRefManager<OBJECT>, OBJECT>
class TRINITY_DLL_SPEC GridReference : public Reference<GridRefManager<OBJECT>, OBJECT>
{
protected:
void targetObjectBuildLink()
+9 -7
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,16 +10,16 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_NGRID_H
#define MANGOS_NGRID_H
#ifndef TRINITY_NGRID_H
#define TRINITY_NGRID_H
/** NGrid is nothing more than a wrapper of the Grid with an NxN cells
*/
@@ -58,9 +60,9 @@ unsigned int N,
class ACTIVE_OBJECT,
class WORLD_OBJECT_TYPES,
class GRID_OBJECT_TYPES,
class ThreadModel = MaNGOS::SingleThreaded<ACTIVE_OBJECT>
class ThreadModel = Trinity::SingleThreaded<ACTIVE_OBJECT>
>
class MANGOS_DLL_DECL NGrid
class TRINITY_DLL_DECL NGrid
{
public:
+13 -11
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,16 +10,16 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_TYPECONTAINER_H
#define MANGOS_TYPECONTAINER_H
#ifndef TRINITY_TYPECONTAINER_H
#define TRINITY_TYPECONTAINER_H
/*
* Here, you'll find a series of containers that allow you to hold multiple
@@ -95,27 +97,27 @@ template<class H, class T> struct ContainerList<TypeList<H, T> >
*/
template<class OBJECT_TYPES>
class MANGOS_DLL_DECL TypeMapContainer
class TRINITY_DLL_DECL TypeMapContainer
{
public:
template<class SPECIFIC_TYPE> size_t Count() const { return MaNGOS::Count(i_elements, (SPECIFIC_TYPE*)NULL); }
template<class SPECIFIC_TYPE> size_t Count() const { return Trinity::Count(i_elements, (SPECIFIC_TYPE*)NULL); }
template<class SPECIFIC_TYPE> SPECIFIC_TYPE* find(OBJECT_HANDLE hdl, SPECIFIC_TYPE *fake) { return MaNGOS::Find(i_elements, hdl,fake); }
template<class SPECIFIC_TYPE> SPECIFIC_TYPE* find(OBJECT_HANDLE hdl, SPECIFIC_TYPE *fake) { return Trinity::Find(i_elements, hdl,fake); }
/// find a specific type of object in the container
template<class SPECIFIC_TYPE> const SPECIFIC_TYPE* find(OBJECT_HANDLE hdl, SPECIFIC_TYPE *fake) const { return MaNGOS::Find(i_elements, hdl,fake); }
template<class SPECIFIC_TYPE> const SPECIFIC_TYPE* find(OBJECT_HANDLE hdl, SPECIFIC_TYPE *fake) const { return Trinity::Find(i_elements, hdl,fake); }
/// inserts a specific object into the container
template<class SPECIFIC_TYPE> bool insert(OBJECT_HANDLE hdl, SPECIFIC_TYPE *obj)
{
SPECIFIC_TYPE* t = MaNGOS::Insert(i_elements, obj, hdl);
SPECIFIC_TYPE* t = Trinity::Insert(i_elements, obj, hdl);
return (t != NULL);
}
/// Removes the object from the container, and returns the removed object
template<class SPECIFIC_TYPE> bool remove(SPECIFIC_TYPE* obj, OBJECT_HANDLE hdl)
{
SPECIFIC_TYPE* t = MaNGOS::Remove(i_elements, obj, hdl);
SPECIFIC_TYPE* t = Trinity::Remove(i_elements, obj, hdl);
return (t != NULL);
}
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef TYPECONTAINER_FUNCTIONS_H
@@ -29,7 +31,7 @@
#include "Utilities/TypeList.h"
#include <map>
namespace MaNGOS
namespace Trinity
{
/* ContainerMapList Helpers */
// count functions
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef TYPECONTAINER_FUNCTIONS_PTR_H
@@ -29,7 +31,7 @@
#include "Utilities/TypeList.h"
#include <map>
namespace MaNGOS
namespace Trinity
{
/* ContainerMapList Helpers */
// count functions
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,16 +10,16 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_TYPECONTAINERVISITOR_H
#define MANGOS_TYPECONTAINERVISITOR_H
#ifndef TRINITY_TYPECONTAINERVISITOR_H
#define TRINITY_TYPECONTAINERVISITOR_H
/*
* @class TypeContainerVisitor is implemented as a visitor pattern. It is
@@ -95,7 +97,7 @@ template<class VISITOR, class OBJECT_TYPES> void VisitorHelper(VISITOR &v, TypeM
}
template<class VISITOR, class TYPE_CONTAINER>
class MANGOS_DLL_DECL TypeContainerVisitor
class TRINITY_DLL_DECL TypeContainerVisitor
{
public:
TypeContainerVisitor(VISITOR &v) : i_visitor(v) {}
+2 -1
View File
@@ -4,7 +4,7 @@
#
# 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 3 of the License, or
# 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,
@@ -64,3 +64,4 @@ EXTRA_DIST = \
Utilities/LinkedList.h \
Utilities/TypeList.h
+7 -5
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,16 +10,16 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_SOCKETDEFINES_H
#define MANGOS_SOCKETDEFINES_H
#ifndef TRINITY_SOCKETDEFINES_H
#define TRINITY_SOCKETDEFINES_H
#ifdef WIN32
+7 -5
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,16 +10,16 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_COMPILERDEFS_H
#define MANGOS_COMPILERDEFS_H
#ifndef TRINITY_COMPILERDEFS_H
#define TRINITY_COMPILERDEFS_H
#define PLATFORM_WINDOWS 0
#define PLATFORM_UNIX 1
+52 -50
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,16 +10,16 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_DEFINE_H
#define MANGOS_DEFINE_H
#ifndef TRINITY_DEFINE_H
#define TRINITY_DEFINE_H
#include "Platform/CompilerDefs.h"
#include <sys/types.h>
@@ -87,102 +89,102 @@ It may well fail, in which case the definitions will need to be set by
editing at the points marked **** EDIT HERE IF NECESSARY **** below.
*/
#define MANGOS_LITTLEENDIAN 0
#define MANGOS_BIGENDIAN 1
#define TRINITY_LITTLEENDIAN 0
#define TRINITY_BIGENDIAN 1
#if !defined(MANGOS_ENDIAN)
#if !defined(TRINITY_ENDIAN)
# if defined(LITTLE_ENDIAN) || defined(BIG_ENDIAN)
# if defined(LITTLE_ENDIAN) && defined(BIG_ENDIAN)
# if defined(BYTE_ORDER)
# if (BYTE_ORDER == LITTLE_ENDIAN)
# define MANGOS_ENDIAN MANGOS_LITTLEENDIAN
# define TRINITY_ENDIAN TRINITY_LITTLEENDIAN
# elif (BYTE_ORDER == BIG_ENDIAN)
# define MANGOS_ENDIAN MANGOS_BIGENDIAN
# define TRINITY_ENDIAN TRINITY_BIGENDIAN
# endif
# endif
# elif defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN)
# define MANGOS_ENDIAN MANGOS_LITTLEENDIAN
# define TRINITY_ENDIAN TRINITY_LITTLEENDIAN
# elif !defined(LITTLE_ENDIAN) && defined(BIG_ENDIAN)
# define MANGOS_ENDIAN MANGOS_BIGENDIAN
# define TRINITY_ENDIAN TRINITY_BIGENDIAN
# endif
# elif defined(_LITTLE_ENDIAN) || defined(_BIG_ENDIAN)
# if defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN)
# if defined(_BYTE_ORDER)
# if (_BYTE_ORDER == _LITTLE_ENDIAN)
# define MANGOS_ENDIAN MANGOS_LITTLEENDIAN
# define TRINITY_ENDIAN TRINITY_LITTLEENDIAN
# elif (_BYTE_ORDER == _BIG_ENDIAN)
# define MANGOS_ENDIAN MANGOS_BIGENDIAN
# define TRINITY_ENDIAN TRINITY_BIGENDIAN
# endif
# endif
# elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)
# define MANGOS_ENDIAN MANGOS_LITTLE_ENDIAN
# define TRINITY_ENDIAN TRINITY_LITTLE_ENDIAN
# elif !defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN)
# define MANGOS_ENDIAN MANGOS_BIGENDIAN
# define TRINITY_ENDIAN TRINITY_BIGENDIAN
# endif
# elif 0 /* **** EDIT HERE IF NECESSARY **** */
# define MANGOS_ENDIAN MANGOS_LITTLEENDIAN
# define TRINITY_ENDIAN TRINITY_LITTLEENDIAN
# elif 0 /* **** EDIT HERE IF NECESSARY **** */
# define MANGOS_ENDIAN MANGOS_BIGENDIAN
# define TRINITY_ENDIAN TRINITY_BIGENDIAN
# elif (('1234' >> 24) == '1')
# define MANGOS_ENDIAN MANGOS_LITTLEENDIAN
# define TRINITY_ENDIAN TRINITY_LITTLEENDIAN
# elif (('4321' >> 24) == '1')
# define MANGOS_ENDIAN MANGOS_BIGENDIAN
# define TRINITY_ENDIAN TRINITY_BIGENDIAN
# else
# define MANGOS_ENDIAN MANGOS_LITTLEENDIAN
# define TRINITY_ENDIAN TRINITY_LITTLEENDIAN
# endif
#endif
/* End of Endian detection code from sha2.c: */
#if PLATFORM == PLATFORM_WINDOWS
#define MANGOS_EXPORT __declspec(dllexport)
#define MANGOS_LIBRARY_HANDLE HMODULE
#define MANGOS_LOAD_LIBRARY(a) LoadLibrary(a)
#define MANGOS_CLOSE_LIBRARY FreeLibrary
#define MANGOS_GET_PROC_ADDR GetProcAddress
#define MANGOS_IMPORT __cdecl
#define MANGOS_SCRIPT_EXT ".dll"
#define MANGOS_SCRIPT_NAME "TrinityScript"
#define TRINITY_EXPORT __declspec(dllexport)
#define TRINITY_LIBRARY_HANDLE HMODULE
#define TRINITY_LOAD_LIBRARY(a) LoadLibrary(a)
#define TRINITY_CLOSE_LIBRARY FreeLibrary
#define TRINITY_GET_PROC_ADDR GetProcAddress
#define TRINITY_IMPORT __cdecl
#define TRINITY_SCRIPT_EXT ".dll"
#define TRINITY_SCRIPT_NAME "TrinityScript"
#else
#define MANGOS_LIBRARY_HANDLE void*
#define MANGOS_EXPORT export
#define MANGOS_LOAD_LIBRARY(a) dlopen(a,RTLD_NOW)
#define MANGOS_CLOSE_LIBRARY dlclose
#define MANGOS_GET_PROC_ADDR dlsym
#define TRINITY_LIBRARY_HANDLE void*
#define TRINITY_EXPORT export
#define TRINITY_LOAD_LIBRARY(a) dlopen(a,RTLD_NOW)
#define TRINITY_CLOSE_LIBRARY dlclose
#define TRINITY_GET_PROC_ADDR dlsym
#if defined(__APPLE_CC__) && defined(BIG_ENDIAN)
#define MANGOS_IMPORT __attribute__ ((longcall))
#define TRINITY_IMPORT __attribute__ ((longcall))
#else
#define MANGOS_IMPORT __attribute__ ((cdecl))
#define TRINITY_IMPORT __attribute__ ((cdecl))
#endif
#define MANGOS_SCRIPT_EXT ".so"
#define MANGOS_SCRIPT_NAME "libtrinityscript"
#define TRINITY_SCRIPT_EXT ".so"
#define TRINITY_SCRIPT_NAME "libtrinityscript"
#endif
#ifdef WIN32
#ifdef MANGOS_WIN32_DLL_IMPORT
#ifdef TRINITY_WIN32_DLL_IMPORT
#define MANGOS_DLL_DECL __declspec(dllimport)
#define TRINITY_DLL_DECL __declspec(dllimport)
#else
#ifdef MANGOS_WIND_DLL_EXPORT
#define MANGOS_DLL_DECL __declspec(dllexport)
#ifdef TRINITY_WIND_DLL_EXPORT
#define TRINITY_DLL_DECL __declspec(dllexport)
#else
#define MANGOS_DLL_DECL
#define TRINITY_DLL_DECL
#endif
#endif
#else
#define MANGOS_DLL_DECL
#define TRINITY_DLL_DECL
#endif
#ifndef DEBUG
#define MANGOS_INLINE inline
#define TRINITY_INLINE inline
#else
#ifndef MANGOS_DEBUG
#define MANGOS_DEBUG
#ifndef TRINITY_DEBUG
#define TRINITY_DEBUG
#endif
#define MANGOS_INLINE
#define TRINITY_INLINE
#endif
#if COMPILER == COMPILER_MICROSOFT
@@ -209,12 +211,12 @@ typedef uint32 DWORD;
typedef uint64 OBJECT_HANDLE;
#if PLATFORM == PLATFORM_WINDOWS
# define MANGOS_DLL_SPEC __declspec(dllexport)
# define TRINITY_DLL_SPEC __declspec(dllexport)
# ifndef DECLSPEC_NORETURN
# define DECLSPEC_NORETURN __declspec(noreturn)
# endif
#else
# define MANGOS_DLL_SPEC
# define TRINITY_DLL_SPEC
# define DECLSPEC_NORETURN
#endif
+12 -10
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,27 +10,27 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_CREATIONPOLICY_H
#define MANGOS_CREATIONPOLICY_H
#ifndef TRINITY_CREATIONPOLICY_H
#define TRINITY_CREATIONPOLICY_H
#include <stdlib.h>
#include "Platform/Define.h"
namespace MaNGOS
namespace Trinity
{
/**
* OperatorNew policy creates an object on the heap using new.
*/
template <class T>
class MANGOS_DLL_DECL OperatorNew
class TRINITY_DLL_DECL OperatorNew
{
public:
static T* Create(void) { return (new T); }
@@ -40,7 +42,7 @@ namespace MaNGOS
* the first time call Create.
*/
template <class T>
class MANGOS_DLL_DECL LocalStaticCreation
class TRINITY_DLL_DECL LocalStaticCreation
{
union MaxAlign
{
@@ -69,7 +71,7 @@ namespace MaNGOS
* CreateUsingMalloc by pass the memory manger.
*/
template<class T>
class MANGOS_DLL_DECL CreateUsingMalloc
class TRINITY_DLL_DECL CreateUsingMalloc
{
public:
static T* Create()
@@ -90,7 +92,7 @@ namespace MaNGOS
* CreateOnCallBack creates the object base on the call back.
*/
template<class T, class CALL_BACK>
class MANGOS_DLL_DECL CreateOnCallBack
class TRINITY_DLL_DECL CreateOnCallBack
{
public:
static T* Create()
+7 -5
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,25 +10,25 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <cstdlib>
#include "ObjectLifeTime.h"
namespace MaNGOS
namespace Trinity
{
extern "C" void external_wrapper(void *p)
{
std::atexit( (void (*)())p );
}
void MANGOS_DLL_SPEC at_exit( void (*func)() )
void TRINITY_DLL_SPEC at_exit( void (*func)() )
{
external_wrapper((void*)func);
}
+10 -8
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,28 +10,28 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_OBJECTLIFETIME_H
#define MANGOS_OBJECTLIFETIME_H
#ifndef TRINITY_OBJECTLIFETIME_H
#define TRINITY_OBJECTLIFETIME_H
#include <stdexcept>
#include "Platform/Define.h"
typedef void (* Destroyer)(void);
namespace MaNGOS
namespace Trinity
{
void MANGOS_DLL_SPEC at_exit( void (*func)() );
void TRINITY_DLL_SPEC at_exit( void (*func)() );
template <class T>
class MANGOS_DLL_DECL ObjectLifeTime
class TRINITY_DLL_DECL ObjectLifeTime
{
public:
inline static void ScheduleCall(void (*destroyer)() )
+12 -10
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,16 +10,16 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_SINGLETON_H
#define MANGOS_SINGLETON_H
#ifndef TRINITY_SINGLETON_H
#define TRINITY_SINGLETON_H
/**
* @brief class Singleton
@@ -27,16 +29,16 @@
#include "ThreadingModel.h"
#include "ObjectLifeTime.h"
namespace MaNGOS
namespace Trinity
{
template
<
typename T,
class ThreadingModel = MaNGOS::SingleThreaded<T>,
class CreatePolicy = MaNGOS::OperatorNew<T>,
class LifeTimePolicy = MaNGOS::ObjectLifeTime<T>
class ThreadingModel = Trinity::SingleThreaded<T>,
class CreatePolicy = Trinity::OperatorNew<T>,
class LifeTimePolicy = Trinity::ObjectLifeTime<T>
>
class MANGOS_DLL_DECL Singleton
class TRINITY_DLL_DECL Singleton
{
public:
static T& Instance();
+21 -19
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,16 +10,16 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_SINGLETONIMPL_H
#define MANGOS_SINGLETONIMPL_H
#ifndef TRINITY_SINGLETONIMPL_H
#define TRINITY_SINGLETONIMPL_H
#include "Singleton.h"
@@ -32,7 +34,7 @@ class CreatePolicy,
class LifeTimePolicy
>
T&
MaNGOS::Singleton<T, ThreadingModel, CreatePolicy, LifeTimePolicy >::Instance()
Trinity::Singleton<T, ThreadingModel, CreatePolicy, LifeTimePolicy >::Instance()
{
if( !si_instance )
{
@@ -61,7 +63,7 @@ class CreatePolicy,
class LifeTimePolicy
>
void
MaNGOS::Singleton<T, ThreadingModel, CreatePolicy, LifeTimePolicy>::DestroySingleton()
Trinity::Singleton<T, ThreadingModel, CreatePolicy, LifeTimePolicy>::DestroySingleton()
{
CreatePolicy::Destroy(si_instance);
si_instance = NULL;
@@ -69,22 +71,22 @@ MaNGOS::Singleton<T, ThreadingModel, CreatePolicy, LifeTimePolicy>::DestroySingl
}
#define INSTANTIATE_SINGLETON_1(TYPE) \
template class MANGOS_DLL_DECL MaNGOS::Singleton<TYPE, MaNGOS::SingleThreaded<TYPE>, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >; \
template<> TYPE* MaNGOS::Singleton<TYPE, MaNGOS::SingleThreaded<TYPE>, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >::si_instance = 0; \
template<> bool MaNGOS::Singleton<TYPE, MaNGOS::SingleThreaded<TYPE>, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >::si_destroyed = false
template class TRINITY_DLL_DECL Trinity::Singleton<TYPE, Trinity::SingleThreaded<TYPE>, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >; \
template<> TYPE* Trinity::Singleton<TYPE, Trinity::SingleThreaded<TYPE>, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >::si_instance = 0; \
template<> bool Trinity::Singleton<TYPE, Trinity::SingleThreaded<TYPE>, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >::si_destroyed = false
#define INSTANTIATE_SINGLETON_2(TYPE, THREADINGMODEL) \
template class MANGOS_DLL_DECL MaNGOS::Singleton<TYPE, THREADINGMODEL, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >; \
template<> TYPE* MaNGOS::Singleton<TYPE, THREADINGMODEL, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >::si_instance = 0; \
template<> bool MaNGOS::Singleton<TYPE, THREADINGMODEL, MaNGOS::OperatorNew<TYPE>, MaNGOS::ObjectLifeTime<TYPE> >::si_destroyed = false
template class TRINITY_DLL_DECL Trinity::Singleton<TYPE, THREADINGMODEL, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >; \
template<> TYPE* Trinity::Singleton<TYPE, THREADINGMODEL, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >::si_instance = 0; \
template<> bool Trinity::Singleton<TYPE, THREADINGMODEL, Trinity::OperatorNew<TYPE>, Trinity::ObjectLifeTime<TYPE> >::si_destroyed = false
#define INSTANTIATE_SINGLETON_3(TYPE, THREADINGMODEL, CREATIONPOLICY ) \
template class MANGOS_DLL_DECL MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, MaNGOS::ObjectLifeTime<TYPE> >; \
template<> TYPE* MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, MaNGOS::ObjectLifeTime<TYPE> >::si_instance = 0; \
template<> bool MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, MaNGOS::ObjectLifeType<TYPE> >::si_destroyed = false
template class TRINITY_DLL_DECL Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, Trinity::ObjectLifeTime<TYPE> >; \
template<> TYPE* Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, Trinity::ObjectLifeTime<TYPE> >::si_instance = 0; \
template<> bool Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, Trinity::ObjectLifeType<TYPE> >::si_destroyed = false
#define INSTANTIATE_SINGLETON_4(TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME) \
template class MANGOS_DLL_DECL MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >; \
template<> TYPE* MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >::si_instance = 0; \
template<> bool MaNGOS::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >::si_destroyed = false
template class TRINITY_DLL_DECL Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >; \
template<> TYPE* Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >::si_instance = 0; \
template<> bool Trinity::Singleton<TYPE, THREADINGMODEL, CREATIONPOLICY, OBJECTLIFETIME >::si_destroyed = false
#endif
+14 -12
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,16 +10,16 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_THREADINGMODEL_H
#define MANGOS_THREADINGMODEL_H
#ifndef TRINITY_THREADINGMODEL_H
#define TRINITY_THREADINGMODEL_H
/**
* @class ThreadingModel<T>
@@ -26,11 +28,11 @@
#include "Platform/Define.h"
namespace MaNGOS
namespace Trinity
{
inline void Guard(void *) {}
template<typename MUTEX> class MANGOS_DLL_DECL GeneralLock
template<typename MUTEX> class TRINITY_DLL_DECL GeneralLock
{
public:
GeneralLock(MUTEX &m) : i_mutex(m)
@@ -49,7 +51,7 @@ namespace MaNGOS
};
template <class T>
class MANGOS_DLL_DECL SingleThreaded
class TRINITY_DLL_DECL SingleThreaded
{
public:
@@ -67,7 +69,7 @@ namespace MaNGOS
// object level lockable
template<class T, class MUTEX>
class MANGOS_DLL_DECL ObjectLevelLockable
class TRINITY_DLL_DECL ObjectLevelLockable
{
public:
ObjectLevelLockable() : i_mtx() {}
@@ -96,7 +98,7 @@ namespace MaNGOS
};
template<class T, class MUTEX>
class MANGOS_DLL_DECL ClassLevelLockable
class TRINITY_DLL_DECL ClassLevelLockable
{
public:
class Lock;
@@ -120,8 +122,8 @@ namespace MaNGOS
}
template<class T, class MUTEX> MUTEX MaNGOS::ClassLevelLockable<T, MUTEX>::si_mtx;
template<class T, class MUTEX> MUTEX Trinity::ClassLevelLockable<T, MUTEX>::si_mtx;
#define INSTANTIATE_CLASS_MUTEX(CTYPE,MUTEX) \
template class MANGOS_DLL_DECL MaNGOS::ClassLevelLockable<CTYPE, MUTEX >
template class TRINITY_DLL_DECL Trinity::ClassLevelLockable<CTYPE, MUTEX >
#endif
+8 -6
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,16 +10,16 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_BYTECONVERTER_H
#define MANGOS_BYTECONVERTER_H
#ifndef TRINITY_BYTECONVERTER_H
#define TRINITY_BYTECONVERTER_H
/** ByteConverter reverse your byte order. This is use
for cross platform where they have different endians.
@@ -44,7 +46,7 @@ namespace ByteConverter
}
}
#if MANGOS_ENDIAN == MANGOS_BIGENDIAN
#if TRINITY_ENDIAN == TRINITY_BIGENDIAN
template<typename T> inline void EndianConvert(T& val) { ByteConverter::apply<T>(&val); }
#else
template<typename T> inline void EndianConvert(T&) { }
+10 -8
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,20 +10,20 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_CALLBACK_H
#define MANGOS_CALLBACK_H
#ifndef TRINITY_CALLBACK_H
#define TRINITY_CALLBACK_H
/// ------------ BASE CLASSES ------------
namespace MaNGOS
namespace Trinity
{
template < class Class, typename ParamType1 = void, typename ParamType2 = void, typename ParamType3 = void, typename ParamType4 = void >
class _Callback
@@ -193,7 +195,7 @@ namespace MaNGOS
/// --------- GENERIC CALLBACKS ----------
namespace MaNGOS
namespace Trinity
{
class ICallback
{
@@ -269,7 +271,7 @@ namespace MaNGOS
class QueryResult;
namespace MaNGOS
namespace Trinity
{
class IQueryCallback
{
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,16 +10,16 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_REFERENCE_H
#define MANGOS_REFERENCE_H
#ifndef TRINITY_REFERENCE_H
#define TRINITY_REFERENCE_H
/**
* Referencer<T>
@@ -38,9 +40,9 @@
template
<
typename T,
class THREADING_MODEL = MaNGOS::SingleThreaded<T>
class THREADING_MODEL = Trinity::SingleThreaded<T>
>
class MANGOS_DLL_DECL Referencer
class TRINITY_DLL_DECL Referencer
{
typedef typename THREADING_MODEL::Lock Lock;
typedef ReferenceHolder<T, THREADING_MODEL> ReferenceeHolder;
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,16 +10,16 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_REFERENCEHOLDER_H
#define MANGOS_REFERENCEHOLDER_H
#ifndef TRINITY_REFERENCEHOLDER_H
#define TRINITY_REFERENCEHOLDER_H
/** ReferenceHolder holds the actualy referenced obejct as well the refence
count. The ReferenecHolder implements as a policy base object and
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,16 +10,16 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_REFERENCEIMPL_H
#define MANGOS_REFERENCEIMPL_H
#ifndef TRINITY_REFERENCEIMPL_H
#define TRINITY_REFERENCEIMPL_H
#include "Reference.h"
+5 -3
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "EventProcessor.h"
+5 -3
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __EVENTPROCESSOR_H
+7 -5
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,16 +10,16 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_HASHMAP_H
#define MANGOS_HASHMAP_H
#ifndef TRINITY_HASHMAP_H
#define TRINITY_HASHMAP_H
#include "Platform/CompilerDefs.h"
#include "Platform/Define.h"
+5 -3
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _LINKEDLIST
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _REFMANAGER_H
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _REFERENCE_H
+7 -5
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,16 +10,16 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_TYPELIST_H
#define MANGOS_TYPELIST_H
#ifndef TRINITY_TYPELIST_H
#define TRINITY_TYPELIST_H
/*
@struct TypeList
+5 -3
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "AccountMgr.h"
+6 -4
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _ACCMGR_H
@@ -52,5 +54,5 @@ class AccountMgr
static bool normilizeString(std::string& utf8str);
};
#define accmgr MaNGOS::Singleton<AccountMgr>::Instance()
#define accmgr Trinity::Singleton<AccountMgr>::Instance()
#endif
+5 -3
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "AddonHandler.h"
+6 -4
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __ADDONHANDLER_H
@@ -33,5 +35,5 @@ class AddonHandler
//built addon packet
bool BuildAddonPacket(WorldPacket* Source, WorldPacket* Target);
};
#define sAddOnHandler MaNGOS::Singleton<AddonHandler>::Instance()
#define sAddOnHandler Trinity::Singleton<AddonHandler>::Instance()
#endif
+5 -3
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "AggressorAI.h"
+8 -6
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,23 +10,23 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_AGGRESSORAI_H
#define MANGOS_AGGRESSORAI_H
#ifndef TRINITY_AGGRESSORAI_H
#define TRINITY_AGGRESSORAI_H
#include "CreatureAI.h"
#include "Timer.h"
class Creature;
class MANGOS_DLL_DECL AggressorAI : public CreatureAI
class TRINITY_DLL_DECL AggressorAI : public CreatureAI
{
enum AggressorState
{
+7 -5
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,16 +10,16 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_ANIMAL_RANDOMMOVEMENTGENERATOR_H
#define MANGOS_ANIMAL_RANDOMMOVEMENTGENERATOR_H
#ifndef TRINITY_ANIMAL_RANDOMMOVEMENTGENERATOR_H
#define TRINITY_ANIMAL_RANDOMMOVEMENTGENERATOR_H
/** AnimalRandomMovementGenerator follows the research on
* quantifying scale-dependant effects of animal movement
+5 -3
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "WorldPacket.h"
+7 -5
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,16 +10,16 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOSSERVER_ARENATEAM_H
#define MANGOSSERVER_ARENATEAM_H
#ifndef TRINITYCORE_ARENATEAM_H
#define TRINITYCORE_ARENATEAM_H
enum ArenaTeamCommandTypes
{
+5 -3
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "WorldSession.h"
+5 -7
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "WorldPacket.h"
@@ -26,7 +28,6 @@
#include "UpdateMask.h"
#include "AuctionHouseObject.h"
#include "Util.h"
#include "IRCClient.h"
//please DO NOT use iterator++, because it is slower than ++iterator!!!
//post-incrementation is always slower than pre-incrementation !
@@ -314,9 +315,6 @@ void WorldSession::HandleAuctionSellItem( WorldPacket & recv_data )
pl->SaveInventoryAndGoldToDB();
CharacterDatabase.CommitTransaction();
if((sIRC.BOTMASK & 1024) != 0)
sIRC.AHFunc(it->GetEntry(), it->GetProto()->Name1, pl->GetName(), location);
SendAuctionCommandResult(AH->Id, AUCTION_SELL_ITEM, AUCTION_OK);
}
+5 -3
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _AUCTION_HOUSE_H
+5 -3
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "Common.h"
+7 -5
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,16 +10,16 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MANGOS_BAG_H
#define MANGOS_BAG_H
#ifndef TRINITY_BAG_H
#define TRINITY_BAG_H
// Maximum 36 Slots ( (CONTAINER_END - CONTAINER_FIELD_SLOT_1)/2
#define MAX_BAG_SIZE 36 // 2.0.12
+13 -11
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "Object.h"
@@ -432,9 +434,9 @@ void BattleGround::EndBattleGround(uint32 winner)
if(winner == ALLIANCE)
{
if(isBattleGround())
winmsg = GetMangosString(LANG_BG_A_WINS);
winmsg = GetTrinityString(LANG_BG_A_WINS);
else
winmsg = GetMangosString(LANG_ARENA_GOLD_WINS);
winmsg = GetTrinityString(LANG_ARENA_GOLD_WINS);
PlaySoundToAll(SOUND_ALLIANCE_WINS); // alliance wins sound
@@ -443,9 +445,9 @@ void BattleGround::EndBattleGround(uint32 winner)
else if(winner == HORDE)
{
if(isBattleGround())
winmsg = GetMangosString(LANG_BG_H_WINS);
winmsg = GetTrinityString(LANG_BG_H_WINS);
else
winmsg = GetMangosString(LANG_ARENA_GREEN_WINS);
winmsg = GetTrinityString(LANG_ARENA_GREEN_WINS);
PlaySoundToAll(SOUND_HORDE_WINS); // horde wins sound
@@ -678,7 +680,7 @@ void BattleGround::SendRewardMarkByMail(Player *plr,uint32 mark, uint32 count)
subject = il->Name[loc_idx];
// text
std::string textFormat = plr->GetSession()->GetMangosString(LANG_BG_MARK_BY_MAIL);
std::string textFormat = plr->GetSession()->GetTrinityString(LANG_BG_MARK_BY_MAIL);
char textBuf[300];
snprintf(textBuf,300,textFormat.c_str(),GetName(),GetName());
uint32 itemTextId = objmgr.CreateItemText( textBuf );
@@ -1349,7 +1351,7 @@ void BattleGround::SendMessageToAll(char const* text)
void BattleGround::SendMessageToAll(int32 entry)
{
char const* text = GetMangosString(entry);
char const* text = GetTrinityString(entry);
WorldPacket data;
ChatHandler::FillMessageData(&data, NULL, CHAT_MSG_BG_SYSTEM_NEUTRAL, LANG_UNIVERSAL, NULL, 0, text, NULL);
SendPacketToAll(&data);
@@ -1365,10 +1367,10 @@ void BattleGround::EndNow()
}
// Battleground messages are localized using the dbc lang, they are not client language dependent
const char *BattleGround::GetMangosString(int32 entry)
const char *BattleGround::GetTrinityString(int32 entry)
{
// FIXME: now we have different DBC locales and need localized message for each target client
return objmgr.GetMangosStringForDBCLocale(entry);
return objmgr.GetTrinityStringForDBCLocale(entry);
}
/*
+6 -4
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __BATTLEGROUND_H
@@ -446,7 +448,7 @@ class BattleGround
void DoorOpen(uint32 type);
void DoorClose(uint32 type);
const char *GetMangosString(int32 entry);
const char *GetTrinityString(int32 entry);
virtual bool HandlePlayerUnderMap(Player * plr) {return false;}
+5 -3
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "Player.h"
+5 -3
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __BATTLEGROUNDAA_H
#define __BATTLEGROUNDAA_H
+23 -25
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "Object.h"
@@ -82,19 +84,19 @@ void BattleGroundAB::Update(time_t diff)
else if( GetStartDelayTime() <= START_DELAY1 && !(m_Events & 0x04) )
{
m_Events |= 0x04;
SendMessageToAll(GetMangosString(LANG_BG_AB_ONEMINTOSTART));
SendMessageToAll(GetTrinityString(LANG_BG_AB_ONEMINTOSTART));
}
// After 1,5 minute, warning is signalled
else if( GetStartDelayTime() <= START_DELAY2 && !(m_Events & 0x08) )
{
m_Events |= 0x08;
SendMessageToAll(GetMangosString(LANG_BG_AB_HALFMINTOSTART));
SendMessageToAll(GetTrinityString(LANG_BG_AB_HALFMINTOSTART));
}
// After 2 minutes, gates OPEN ! x)
else if( GetStartDelayTime() < 0 && !(m_Events & 0x10) )
{
m_Events |= 0x10;
SendMessageToAll(GetMangosString(LANG_BG_AB_STARTED));
SendMessageToAll(GetTrinityString(LANG_BG_AB_STARTED));
// spawn neutral banners
for (int banner = BG_AB_OBJECT_BANNER_NEUTRAL, i = 0; i < 5; banner += 8, ++i)
@@ -108,13 +110,9 @@ void BattleGroundAB::Update(time_t diff)
DoorOpen(BG_AB_OBJECT_GATE_A);
DoorOpen(BG_AB_OBJECT_GATE_H);
PlaySoundToAll(SOUND_BG_START);
if(sWorld.getConfig(CONFIG_BG_START_MUSIC))
{
PlaySoundToAll(SOUND_BG_START);
PlaySoundToAll(SOUND_BG_START_L70ETC); //MUSIC
}
else
PlaySoundToAll(SOUND_BG_START);
PlaySoundToAll(SOUND_BG_START_L70ETC); //MUSIC
SetStatus(STATUS_IN_PROGRESS);
for(BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
@@ -162,7 +160,7 @@ void BattleGroundAB::Update(time_t diff)
// Message to chatlog
char buf[256];
uint8 type = (teamIndex == 0) ? CHAT_MSG_BG_SYSTEM_ALLIANCE : CHAT_MSG_BG_SYSTEM_HORDE;
sprintf(buf, GetMangosString(LANG_BG_AB_NODE_TAKEN), (teamIndex == 0) ? GetMangosString(LANG_BG_AB_ALLY) : GetMangosString(LANG_BG_AB_HORDE), _GetNodeName(node));
sprintf(buf, GetTrinityString(LANG_BG_AB_NODE_TAKEN), (teamIndex == 0) ? GetTrinityString(LANG_BG_AB_ALLY) : GetTrinityString(LANG_BG_AB_HORDE), _GetNodeName(node));
WorldPacket data;
ChatHandler::FillMessageData(&data, NULL, type, LANG_UNIVERSAL, NULL, 0, buf, NULL);
SendPacketToAll(&data);
@@ -201,9 +199,9 @@ void BattleGroundAB::Update(time_t diff)
if( !m_IsInformedNearVictory && m_TeamScores[team] > 1800 )
{
if( team == BG_TEAM_ALLIANCE )
SendMessageToAll(GetMangosString(LANG_BG_AB_A_NEAR_VICTORY));
SendMessageToAll(GetTrinityString(LANG_BG_AB_A_NEAR_VICTORY));
else
SendMessageToAll(GetMangosString(LANG_BG_AB_H_NEAR_VICTORY));
SendMessageToAll(GetTrinityString(LANG_BG_AB_H_NEAR_VICTORY));
PlaySoundToAll(SOUND_NEAR_VICTORY);
m_IsInformedNearVictory = true;
}
@@ -314,15 +312,15 @@ const char* BattleGroundAB::_GetNodeName(uint8 node)
switch (node)
{
case BG_AB_NODE_STABLES:
return GetMangosString(LANG_BG_AB_NODE_STABLES);
return GetTrinityString(LANG_BG_AB_NODE_STABLES);
case BG_AB_NODE_BLACKSMITH:
return GetMangosString(LANG_BG_AB_NODE_BLACKSMITH);
return GetTrinityString(LANG_BG_AB_NODE_BLACKSMITH);
case BG_AB_NODE_FARM:
return GetMangosString(LANG_BG_AB_NODE_FARM);
return GetTrinityString(LANG_BG_AB_NODE_FARM);
case BG_AB_NODE_LUMBER_MILL:
return GetMangosString(LANG_BG_AB_NODE_LUMBER_MILL);
return GetTrinityString(LANG_BG_AB_NODE_LUMBER_MILL);
case BG_AB_NODE_GOLD_MINE:
return GetMangosString(LANG_BG_AB_NODE_GOLD_MINE);
return GetTrinityString(LANG_BG_AB_NODE_GOLD_MINE);
default:
ASSERT(0);
}
@@ -477,7 +475,7 @@ void BattleGroundAB::EventPlayerClickedOnFlag(Player *source, GameObject* /*targ
_CreateBanner(node, BG_AB_NODE_TYPE_CONTESTED, teamIndex, true);
_SendNodeUpdate(node);
m_NodeTimers[node] = BG_AB_FLAG_CAPTURING_TIME;
sprintf(buf, GetMangosString(LANG_BG_AB_NODE_CLAIMED), _GetNodeName(node), (teamIndex == 0) ? GetMangosString(LANG_BG_AB_ALLY) : GetMangosString(LANG_BG_AB_HORDE));
sprintf(buf, GetTrinityString(LANG_BG_AB_NODE_CLAIMED), _GetNodeName(node), (teamIndex == 0) ? GetTrinityString(LANG_BG_AB_ALLY) : GetTrinityString(LANG_BG_AB_HORDE));
sound = SOUND_NODE_CLAIMED;
}
// If node is contested
@@ -495,7 +493,7 @@ void BattleGroundAB::EventPlayerClickedOnFlag(Player *source, GameObject* /*targ
_CreateBanner(node, BG_AB_NODE_TYPE_CONTESTED, teamIndex, true);
_SendNodeUpdate(node);
m_NodeTimers[node] = BG_AB_FLAG_CAPTURING_TIME;
sprintf(buf, GetMangosString(LANG_BG_AB_NODE_ASSAULTED), _GetNodeName(node));
sprintf(buf, GetTrinityString(LANG_BG_AB_NODE_ASSAULTED), _GetNodeName(node));
}
// If contested, change back to occupied
else
@@ -510,7 +508,7 @@ void BattleGroundAB::EventPlayerClickedOnFlag(Player *source, GameObject* /*targ
_SendNodeUpdate(node);
m_NodeTimers[node] = 0;
_NodeOccupied(node,(teamIndex == 0) ? ALLIANCE:HORDE);
sprintf(buf, GetMangosString(LANG_BG_AB_NODE_DEFENDED), _GetNodeName(node));
sprintf(buf, GetTrinityString(LANG_BG_AB_NODE_DEFENDED), _GetNodeName(node));
}
sound = (teamIndex == 0) ? SOUND_NODE_ASSAULTED_ALLIANCE : SOUND_NODE_ASSAULTED_HORDE;
}
@@ -527,7 +525,7 @@ void BattleGroundAB::EventPlayerClickedOnFlag(Player *source, GameObject* /*targ
_SendNodeUpdate(node);
_NodeDeOccupied(node);
m_NodeTimers[node] = BG_AB_FLAG_CAPTURING_TIME;
sprintf(buf, GetMangosString(LANG_BG_AB_NODE_ASSAULTED), _GetNodeName(node));
sprintf(buf, GetTrinityString(LANG_BG_AB_NODE_ASSAULTED), _GetNodeName(node));
sound = (teamIndex == 0) ? SOUND_NODE_ASSAULTED_ALLIANCE : SOUND_NODE_ASSAULTED_HORDE;
}
WorldPacket data;
@@ -536,7 +534,7 @@ void BattleGroundAB::EventPlayerClickedOnFlag(Player *source, GameObject* /*targ
// If node is occupied again, send "X has taken the Y" msg.
if( m_Nodes[node] >= BG_AB_NODE_TYPE_OCCUPIED )
{
sprintf(buf, GetMangosString(LANG_BG_AB_NODE_TAKEN), (teamIndex == 0) ? GetMangosString(LANG_BG_AB_ALLY) : GetMangosString(LANG_BG_AB_HORDE), _GetNodeName(node));
sprintf(buf, GetTrinityString(LANG_BG_AB_NODE_TAKEN), (teamIndex == 0) ? GetTrinityString(LANG_BG_AB_ALLY) : GetTrinityString(LANG_BG_AB_HORDE), _GetNodeName(node));
ChatHandler::FillMessageData(&data, NULL, type, LANG_UNIVERSAL, NULL, 0, buf, NULL);
SendPacketToAll(&data);
}
+5 -3
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __BATTLEGROUNDAB_H
#define __BATTLEGROUNDAB_H
+5 -3
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "Object.h"
+5 -3
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __BATTLEGROUNDAV_H
+5 -3
View File
@@ -1,5 +1,7 @@
/*
* Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/>
* Copyright (C) 2008 Trinity <http://www.trinitycore.org/>
*
* Thanks to the original authors: MaNGOS <http://www.mangosproject.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
@@ -8,12 +10,12 @@
*
* 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
* 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
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "Object.h"
Loaded 100 of 463 files, more files were not shown because too many files have changed in this diff. Show more