From 46aa1294aa9a0f7cdc1c279d7503ed0717778b28 Mon Sep 17 00:00:00 2001 From: runningnak3d Date: Sat, 27 Dec 2008 09:27:52 +0000 Subject: * More clean up. --HG-- branch : trunk --- sql/characters.sql | 352 +++++++++++++++++++---------------------- sql/updates/541_characters.sql | 5 - sql/updates/559_characters.sql | 2 - sql/updates/608_world.sql | 2 +- 4 files changed, 162 insertions(+), 199 deletions(-) delete mode 100644 sql/updates/559_characters.sql (limited to 'sql') diff --git a/sql/characters.sql b/sql/characters.sql index 4bb56a23297..2e5eedcf6a7 100644 --- a/sql/characters.sql +++ b/sql/characters.sql @@ -15,35 +15,6 @@ /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; - --- --- Table structure for table `saved_variables` --- - -CREATE TABLE `saved_variables` ( - `NextArenaPointDistributionTime` bigint(40) UNSIGNED NOT NULL DEFAULT '0' -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Variable Saves'; - --- --- Table structure for table `character_db_version` --- - -DROP TABLE IF EXISTS `character_db_version`; -CREATE TABLE `character_db_version` ( - `required_2008_12_15_01_character_arenas` bit(1) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Last applied sql update to DB'; - --- --- Dumping data for table `character_db_version` --- - -LOCK TABLES `character_db_version` WRITE; -/*!40000 ALTER TABLE `character_db_version` DISABLE KEYS */; -INSERT INTO `character_db_version` VALUES -(NULL); -/*!40000 ALTER TABLE `character_db_version` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `arena_team` -- @@ -83,7 +54,7 @@ CREATE TABLE `arena_team_member` ( `wons_week` int(10) unsigned NOT NULL default '0', `played_season` int(10) unsigned NOT NULL default '0', `wons_season` int(10) unsigned NOT NULL default '0', - `personal_rating` int(10) UNSIGNED NOT NULL DEFAULT '0' + `points_to_add` int(10) unsigned NOT NULL default '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- @@ -172,62 +143,6 @@ LOCK TABLES `bugreport` WRITE; /*!40000 ALTER TABLE `bugreport` ENABLE KEYS */; UNLOCK TABLES; --- --- Table structure for table `characters` --- - -DROP TABLE IF EXISTS `characters`; -CREATE TABLE `characters` ( - `guid` int(11) unsigned NOT NULL default '0' COMMENT 'Global Unique Identifier', - `account` int(11) unsigned NOT NULL default '0' COMMENT 'Account Identifier', - `data` longtext, - `name` varchar(12) NOT NULL default '', - `race` tinyint(3) unsigned NOT NULL default '0', - `class` tinyint(3) unsigned NOT NULL default '0', - `position_x` float NOT NULL default '0', - `position_y` float NOT NULL default '0', - `position_z` float NOT NULL default '0', - `map` int(11) unsigned NOT NULL default '0' COMMENT 'Map Identifier', - `dungeon_difficulty` tinyint(1) unsigned NOT NULL DEFAULT '0', - `orientation` float NOT NULL default '0', - `taximask` longtext, - `online` tinyint(3) unsigned NOT NULL default '0', - `cinematic` tinyint(3) unsigned NOT NULL default '0', - `totaltime` int(11) unsigned NOT NULL default '0', - `leveltime` int(11) unsigned NOT NULL default '0', - `logout_time` bigint(20) unsigned NOT NULL default '0', - `is_logout_resting` tinyint(3) unsigned NOT NULL default '0', - `rest_bonus` float NOT NULL default '0', - `resettalents_cost` int(11) unsigned NOT NULL default '0', - `resettalents_time` bigint(20) unsigned NOT NULL default '0', - `trans_x` float NOT NULL default '0', - `trans_y` float NOT NULL default '0', - `trans_z` float NOT NULL default '0', - `trans_o` float NOT NULL default '0', - `transguid` bigint(20) unsigned NOT NULL default '0', - `extra_flags` int(11) unsigned NOT NULL default '0', - `stable_slots` tinyint(1) unsigned NOT NULL default '0', - `at_login` int(11) unsigned NOT NULL default '0', - `zone` int(11) unsigned NOT NULL default '0', - `death_expire_time` bigint(20) unsigned NOT NULL default '0', - `taxi_path` text, - `arena_pending_points` int(10) UNSIGNED NOT NULL default '0', - `latency` int(11) unsigned NOT NULL default '0', - PRIMARY KEY (`guid`), - KEY `idx_account` (`account`), - KEY `idx_online` (`online`), - KEY `idx_name` (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Player System'; - --- --- Dumping data for table `characters` --- - -LOCK TABLES `characters` WRITE; -/*!40000 ALTER TABLE `characters` DISABLE KEYS */; -/*!40000 ALTER TABLE `characters` ENABLE KEYS */; -UNLOCK TABLES; - -- -- Table structure for table `character_action` -- @@ -261,7 +176,6 @@ CREATE TABLE `character_aura` ( `caster_guid` bigint(20) unsigned NOT NULL default '0' COMMENT 'Full Global Unique Identifier', `spell` int(11) unsigned NOT NULL default '0', `effect_index` int(11) unsigned NOT NULL default '0', - `stackcount` int(11) NOT NULL default '1', `amount` int(11) NOT NULL default '0', `maxduration` int(11) NOT NULL default '0', `remaintime` int(11) NOT NULL default '0', @@ -451,7 +365,7 @@ CREATE TABLE `character_pet_declinedname` ( `instrumental` varchar(12) NOT NULL default '', `prepositional` varchar(12) NOT NULL default '', PRIMARY KEY (`id`), - KEY owner_key (`owner`) + KEY `owner_key` (`owner`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; -- @@ -548,7 +462,7 @@ CREATE TABLE `character_social` ( `guid` int(11) unsigned NOT NULL default '0' COMMENT 'Character Global Unique Identifier', `friend` int(11) unsigned NOT NULL default '0' COMMENT 'Friend Global Unique Identifier', `flags` tinyint(1) unsigned NOT NULL default '0' COMMENT 'Friend Flags', - `note` varchar(48) NOT NULL DEFAULT '' COMMENT 'Friend Note', + `note` varchar(48) NOT NULL default '' COMMENT 'Friend Note', PRIMARY KEY (`guid`,`friend`,`flags`), KEY `guid` (`guid`), KEY `friend` (`friend`), @@ -619,7 +533,7 @@ CREATE TABLE `character_ticket` ( `ticket_id` int(11) unsigned NOT NULL auto_increment, `guid` int(11) unsigned NOT NULL default '0', `ticket_text` text, - `ticket_lastchange` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + `ticket_lastchange` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, PRIMARY KEY (`ticket_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Player System'; @@ -649,7 +563,7 @@ CREATE TABLE `character_tutorial` ( `tut6` int(11) unsigned NOT NULL default '0', `tut7` int(11) unsigned NOT NULL default '0', PRIMARY KEY (`account`,`realmid`), - KEY acc_key (`account`) + KEY `acc_key` (`account`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Player System'; -- @@ -661,6 +575,61 @@ LOCK TABLES `character_tutorial` WRITE; /*!40000 ALTER TABLE `character_tutorial` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `characters` +-- + +DROP TABLE IF EXISTS `characters`; +CREATE TABLE `characters` ( + `guid` int(11) unsigned NOT NULL default '0' COMMENT 'Global Unique Identifier', + `account` int(11) unsigned NOT NULL default '0' COMMENT 'Account Identifier', + `data` longtext, + `name` varchar(12) NOT NULL default '', + `race` tinyint(3) unsigned NOT NULL default '0', + `class` tinyint(3) unsigned NOT NULL default '0', + `position_x` float NOT NULL default '0', + `position_y` float NOT NULL default '0', + `position_z` float NOT NULL default '0', + `map` int(11) unsigned NOT NULL default '0' COMMENT 'Map Identifier', + `dungeon_difficulty` tinyint(1) unsigned NOT NULL default '0', + `orientation` float NOT NULL default '0', + `taximask` longtext, + `online` tinyint(3) unsigned NOT NULL default '0', + `cinematic` tinyint(3) unsigned NOT NULL default '0', + `totaltime` int(11) unsigned NOT NULL default '0', + `leveltime` int(11) unsigned NOT NULL default '0', + `logout_time` bigint(20) unsigned NOT NULL default '0', + `is_logout_resting` tinyint(3) unsigned NOT NULL default '0', + `rest_bonus` float NOT NULL default '0', + `resettalents_cost` int(11) unsigned NOT NULL default '0', + `resettalents_time` bigint(20) unsigned NOT NULL default '0', + `trans_x` float NOT NULL default '0', + `trans_y` float NOT NULL default '0', + `trans_z` float NOT NULL default '0', + `trans_o` float NOT NULL default '0', + `transguid` bigint(20) unsigned NOT NULL default '0', + `extra_flags` tinyint(3) unsigned NOT NULL default '0', + `stable_slots` tinyint(1) unsigned NOT NULL default '0', + `at_login` int(11) unsigned NOT NULL default '0', + `zone` int(11) unsigned NOT NULL default '0', + `death_expire_time` bigint(20) unsigned NOT NULL default '0', + `taxi_path` text, + `latency` int(11) unsigned NOT NULL default '0', + PRIMARY KEY (`guid`), + KEY `idx_account` (`account`), + KEY `idx_online` (`online`), + KEY `idx_name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Player System'; + +-- +-- Dumping data for table `characters` +-- + +LOCK TABLES `characters` WRITE; +/*!40000 ALTER TABLE `characters` DISABLE KEYS */; +/*!40000 ALTER TABLE `characters` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `corpse` -- @@ -694,42 +663,51 @@ LOCK TABLES `corpse` WRITE; UNLOCK TABLES; -- --- Table structure for table `groups` +-- Table structure for table `game_event_condition_save` -- -DROP TABLE IF EXISTS `groups`; -CREATE TABLE `groups` ( - `leaderGuid` int(11) unsigned NOT NULL, - `mainTank` int(11) unsigned NOT NULL, - `mainAssistant` int(11) unsigned NOT NULL, - `lootMethod` tinyint(4) unsigned NOT NULL, - `looterGuid` int(11) unsigned NOT NULL, - `lootThreshold` tinyint(4) unsigned NOT NULL, - `icon1` int(11) unsigned NOT NULL, - `icon2` int(11) unsigned NOT NULL, - `icon3` int(11) unsigned NOT NULL, - `icon4` int(11) unsigned NOT NULL, - `icon5` int(11) unsigned NOT NULL, - `icon6` int(11) unsigned NOT NULL, - `icon7` int(11) unsigned NOT NULL, - `icon8` int(11) unsigned NOT NULL, - `isRaid` tinyint(1) unsigned NOT NULL, - `difficulty` tinyint(3) unsigned NOT NULL default '0', - PRIMARY KEY (`leaderGuid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Groups'; +DROP TABLE IF EXISTS `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; -- --- Dumping data for table `groups` +-- Dumping data for table `game_event_condition_save` -- -LOCK TABLES `groups` WRITE; -/*!40000 ALTER TABLE `groups` DISABLE KEYS */; -/*!40000 ALTER TABLE `groups` ENABLE KEYS */; +LOCK TABLES `game_event_condition_save` WRITE; +/*!40000 ALTER TABLE `game_event_condition_save` DISABLE KEYS */; +/*!40000 ALTER TABLE `game_event_condition_save` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `game_event_save` +-- + +DROP TABLE IF EXISTS `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; + +-- +-- Dumping data for table `game_event_save` +-- + +LOCK TABLES `game_event_save` WRITE; +/*!40000 ALTER TABLE `game_event_save` DISABLE KEYS */; +/*!40000 ALTER TABLE `game_event_save` ENABLE KEYS */; UNLOCK TABLES; --- ---------------------------- --- Table structure for group_instance --- ---------------------------- +-- +-- Table structure for table `group_instance` +-- + DROP TABLE IF EXISTS `group_instance`; CREATE TABLE `group_instance` ( `leaderGuid` int(11) unsigned NOT NULL default '0', @@ -770,6 +748,40 @@ LOCK TABLES `group_member` WRITE; /*!40000 ALTER TABLE `group_member` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `groups` +-- + +DROP TABLE IF EXISTS `groups`; +CREATE TABLE `groups` ( + `leaderGuid` int(11) unsigned NOT NULL, + `mainTank` int(11) unsigned NOT NULL, + `mainAssistant` int(11) unsigned NOT NULL, + `lootMethod` tinyint(4) unsigned NOT NULL, + `looterGuid` int(11) unsigned NOT NULL, + `lootThreshold` tinyint(4) unsigned NOT NULL, + `icon1` int(11) unsigned NOT NULL, + `icon2` int(11) unsigned NOT NULL, + `icon3` int(11) unsigned NOT NULL, + `icon4` int(11) unsigned NOT NULL, + `icon5` int(11) unsigned NOT NULL, + `icon6` int(11) unsigned NOT NULL, + `icon7` int(11) unsigned NOT NULL, + `icon8` int(11) unsigned NOT NULL, + `isRaid` tinyint(1) unsigned NOT NULL, + `difficulty` tinyint(3) unsigned NOT NULL default '0', + PRIMARY KEY (`leaderGuid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Groups'; + +-- +-- Dumping data for table `groups` +-- + +LOCK TABLES `groups` WRITE; +/*!40000 ALTER TABLE `groups` DISABLE KEYS */; +/*!40000 ALTER TABLE `groups` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `guild` -- @@ -839,7 +851,7 @@ CREATE TABLE `guild_bank_item` ( `SlotId` tinyint(3) unsigned NOT NULL default '0', `item_guid` int(11) unsigned NOT NULL default '0', `item_entry` int(11) unsigned NOT NULL default '0', - PRIMARY KEY (`guildid`,`tabid`,`slotid`), + PRIMARY KEY (`guildid`,`TabId`,`SlotId`), KEY `guildid_key` (`guildid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -886,7 +898,7 @@ CREATE TABLE `guild_bank_tab` ( `TabId` tinyint(1) unsigned NOT NULL default '0', `TabName` varchar(100) NOT NULL default '', `TabIcon` varchar(100) NOT NULL default '', - `TabText` text, + `TabText` varchar(500) NOT NULL default '', PRIMARY KEY (`guildid`,`TabId`), KEY `guildid_key` (`guildid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -913,7 +925,7 @@ CREATE TABLE `guild_eventlog` ( `PlayerGuid2` int(11) NOT NULL COMMENT 'Player 2', `NewRank` tinyint(2) NOT NULL COMMENT 'New rank(in case promotion/demotion)', `TimeStamp` bigint(20) NOT NULL COMMENT 'Event UNIX time' -) ENGINE = InnoDB DEFAULT CHARSET = latin1 COMMENT 'Guild Eventlog'; +) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Guild Eventlog'; -- -- Dumping data for table `guild_eventlog` @@ -951,7 +963,7 @@ CREATE TABLE `guild_member` ( `BankRemSlotsTab5` int(11) unsigned NOT NULL default '0', KEY `guildid_key` (`guildid`), KEY `guildid_rank_key` (`guildid`,`rank`), - UNIQUE KEY `guid_key` (`guid`) + KEY `guid_key` (`guid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Guild System'; -- @@ -986,6 +998,25 @@ LOCK TABLES `guild_rank` WRITE; /*!40000 ALTER TABLE `guild_rank` ENABLE KEYS */; UNLOCK TABLES; +-- +-- Table structure for table `has_logged_in_before` +-- + +DROP TABLE IF EXISTS `has_logged_in_before`; +CREATE TABLE `has_logged_in_before` ( + `guid` int(11) unsigned NOT NULL default '0', + PRIMARY KEY (`guid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='ImpConfig check'; + +-- +-- Dumping data for table `has_logged_in_before` +-- + +LOCK TABLES `has_logged_in_before` WRITE; +/*!40000 ALTER TABLE `has_logged_in_before` DISABLE KEYS */; +/*!40000 ALTER TABLE `has_logged_in_before` ENABLE KEYS */; +UNLOCK TABLES; + -- -- Table structure for table `instance` -- @@ -1011,9 +1042,10 @@ LOCK TABLES `instance` WRITE; /*!40000 ALTER TABLE `instance` ENABLE KEYS */; UNLOCK TABLES; --- ---------------------------- --- Table structure for instance_reset --- ---------------------------- +-- +-- Table structure for table `instance_reset` +-- + DROP TABLE IF EXISTS `instance_reset`; CREATE TABLE `instance_reset` ( `mapid` int(11) unsigned NOT NULL default '0', @@ -1138,7 +1170,6 @@ CREATE TABLE `pet_aura` ( `caster_guid` bigint(20) unsigned NOT NULL default '0' COMMENT 'Full Global Unique Identifier', `spell` int(11) unsigned NOT NULL default '0', `effect_index` int(11) unsigned NOT NULL default '0', - `stackcount` int(11) NOT NULL default '1', `amount` int(11) NOT NULL default '0', `maxduration` int(11) NOT NULL default '0', `remaintime` int(11) NOT NULL default '0', @@ -1234,6 +1265,7 @@ CREATE TABLE `petition_sign` ( `type` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`petitionguid`,`playerguid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Guild System'; + -- -- Dumping data for table `petition_sign` -- @@ -1249,8 +1281,8 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `saved_variables`; CREATE TABLE `saved_variables` ( - `NextArenaPointDistributionTime` bigint(40) UNSIGNED NOT NULL DEFAULT '0' -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Variable Saves'; + `NextArenaPointDistributionTime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Variable Saves'; -- -- Dumping data for table `saved_variables` @@ -1260,68 +1292,6 @@ LOCK TABLES `saved_variables` WRITE; /*!40000 ALTER TABLE `saved_variables` DISABLE KEYS */; /*!40000 ALTER TABLE `saved_variables` ENABLE KEYS */; UNLOCK TABLES; - --- --- Table structure for table `game_event_condition_save` --- - -DROP TABLE IF EXISTS `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; - --- --- Dumping data for table `game_event_condition_save` --- - -LOCK TABLES `game_event_condition_save` WRITE; -/*!40000 ALTER TABLE `game_event_condition_save` DISABLE KEYS */; -/*!40000 ALTER TABLE `game_event_condition_save` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `game_event_save` --- - -DROP TABLE IF EXISTS `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; - --- --- Dumping data for table `game_event_save` --- - -LOCK TABLES `game_event_save` WRITE; -/*!40000 ALTER TABLE `game_event_save` DISABLE KEYS */; -/*!40000 ALTER TABLE `game_event_save` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `has_logged_in_before` --- - -DROP TABLE IF EXISTS `has_logged_in_before`; -CREATE TABLE `has_logged_in_before` ( - `guid` int(11) unsigned NOT NULL default '0', - PRIMARY KEY (`guid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='ImpConfig check'; - --- --- Dumping data for table `has_logged_in_before` --- - -LOCK TABLES `has_logged_in_before` WRITE; -/*!40000 ALTER TABLE `has_logged_in_before` DISABLE KEYS */; -/*!40000 ALTER TABLE `has_logged_in_before` ENABLE KEYS */; -UNLOCK TABLES; - /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; diff --git a/sql/updates/541_characters.sql b/sql/updates/541_characters.sql index 0cca696278b..2651c069e05 100644 --- a/sql/updates/541_characters.sql +++ b/sql/updates/541_characters.sql @@ -3,11 +3,6 @@ CREATE TABLE `saved_variables` ( `NextArenaPointDistributionTime` bigint(40) UNSIGNED NOT NULL DEFAULT '0' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Variable Saves'; -ALTER TABLE arena_team_member CHANGE games_week played_week int(10) unsigned NOT NULL default '0'; -ALTER TABLE arena_team_member CHANGE wins_week wons_week int(10) unsigned NOT NULL default '0'; -ALTER TABLE arena_team_member CHANGE games_season played_season int(10) unsigned NOT NULL default '0'; -ALTER TABLE arena_team_member CHANGE wins_season wons_season int(10) unsigned NOT NULL default '0'; - ALTER TABLE `arena_team_member` DROP COLUMN `points_to_add`; ALTER TABLE `arena_team_member` ADD COLUMN `personal_rating` int(10) UNSIGNED NOT NULL DEFAULT '0'; ALTER TABLE `characters` ADD COLUMN `arena_pending_points` int(10) UNSIGNED NOT NULL default '0' AFTER `taxi_path`; diff --git a/sql/updates/559_characters.sql b/sql/updates/559_characters.sql deleted file mode 100644 index 4544be275b2..00000000000 --- a/sql/updates/559_characters.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE characters - CHANGE COLUMN gmstate extra_flags int(11) unsigned NOT NULL default '0'; diff --git a/sql/updates/608_world.sql b/sql/updates/608_world.sql index 7e38dc43c38..5c052ecd078 100644 --- a/sql/updates/608_world.sql +++ b/sql/updates/608_world.sql @@ -163,4 +163,4 @@ INSERT INTO `spell_script_target` VALUES (46852,0,181605), -- Ribbon Pole Music (46896,0,181605), (47104,1,26401), -(49058,1,24968); -- Rocket Bot Attack \ No newline at end of file +(49058,1,24968); -- Rocket Bot Attack -- cgit v1.2.3 From 5d842d667bdc59db3f626fa5175c12f8e2f88ea0 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sat, 27 Dec 2008 16:44:14 +0100 Subject: *Support for quest 435 --HG-- branch : trunk --- sql/updates/678_world_scripts.sql | 1 + .../zone/silverpine_forest/silverpine_forest.cpp | 132 ++++++++++++++++++++- 2 files changed, 132 insertions(+), 1 deletion(-) create mode 100644 sql/updates/678_world_scripts.sql (limited to 'sql') diff --git a/sql/updates/678_world_scripts.sql b/sql/updates/678_world_scripts.sql new file mode 100644 index 00000000000..15d43204734 --- /dev/null +++ b/sql/updates/678_world_scripts.sql @@ -0,0 +1 @@ +update creature_template set scriptname='npc_deathstalker_erland' where entry=1978; \ No newline at end of file diff --git a/src/bindings/scripts/scripts/zone/silverpine_forest/silverpine_forest.cpp b/src/bindings/scripts/scripts/zone/silverpine_forest/silverpine_forest.cpp index 8b281556d6e..fa03fe37add 100644 --- a/src/bindings/scripts/scripts/zone/silverpine_forest/silverpine_forest.cpp +++ b/src/bindings/scripts/scripts/zone/silverpine_forest/silverpine_forest.cpp @@ -17,15 +17,17 @@ /* ScriptData SDName: Silverpine_Forest SD%Complete: 100 -SDComment: Quest support: 1886 +SDComment: Quest support: 1886, 435 SDCategory: Silverpine Forest EndScriptData */ /* ContentData npc_astor_hadren +npc_deathstalker_erland EndContentData */ #include "precompiled.h" +#include "../../npc/npc_escortAI.h" /*###### ## npc_astor_hadren @@ -83,6 +85,128 @@ bool GossipSelect_npc_astor_hadren(Player *player, Creature *_Creature, uint32 s return true; } +/*###### +## npc_deathstalker_erland +######*/ + +#define SAY_QUESTACCEPT "Let's get to the others, and keep an eye open for those wolves cutside..." +#define SAY_START "Be careful, $N. Those wolves like to hide among the trees." +#define SAY_AGGRO_1 "A Mottled Worg attacks!" +#define SAY_AGGRO_2 "Beware! I am under attack!" +#define SAY_LAST "We're almost there!" + +#define SAY_THANKS "We made it! Thanks, $N. I couldn't have gotten without you." +#define SAY_RANE "It's good to see you again, Erland. What is your report?" +#define SAY_ANSWER "Masses of wolves are to the east, and whoever lived at Malden's Orchard is gone." +#define SAY_MOVE_QUINN "If I am excused, then I'd like to check on Quinn..." + +#define SAY_GREETINGS "Hello, Quinn. How are you faring?" +#define SAY_QUINN "I've been better. Ivar the Foul got the better of me..." +#define SAY_ON_BYE "Try to take better care of yourself, Quinn. You were lucky this time." + +#define QUEST_ESCORTING 435 +#define NPC_RANE 1950 +#define NPC_QUINN 1951 + +struct TRINITY_DLL_DECL npc_deathstalker_erlandAI : public npc_escortAI +{ + npc_deathstalker_erlandAI(Creature *c) : npc_escortAI(c) {Reset();} + + void WaypointReached(uint32 i) + { + Unit* player = Unit::GetUnit((*m_creature), PlayerGUID); + + if (!player) + return; + + switch(i) + { + case 1: DoSay(SAY_START, LANG_UNIVERSAL, player);break; + case 13: + DoSay(SAY_LAST, LANG_UNIVERSAL, player); + ((Player*)player)->GroupEventHappens(QUEST_ESCORTING, m_creature);break; + case 14: DoSay(SAY_THANKS, LANG_UNIVERSAL, player);break; + case 15: { + Unit* Rane = FindCreature(NPC_RANE, 20); + if(Rane) + ((Creature*)Rane)->Say(SAY_RANE, LANG_UNIVERSAL, NULL); + break;} + case 16: DoSay(SAY_ANSWER, LANG_UNIVERSAL, NULL);break; + case 17: DoSay(SAY_MOVE_QUINN, LANG_UNIVERSAL, NULL); break; + case 24: DoSay(SAY_GREETINGS, LANG_UNIVERSAL, NULL);break; + case 25: { + Unit* Quinn = FindCreature(NPC_QUINN, 20); + if(Quinn) + ((Creature*)Quinn)->Say(SAY_QUINN, LANG_GUTTERSPEAK, NULL); + break;} + case 26: DoSay(SAY_ON_BYE, LANG_UNIVERSAL, NULL);break; + + } + } + + void Reset() {} + + void Aggro(Unit* who) + { + switch(rand()%2) + { + case 0: DoSay(SAY_AGGRO_1, LANG_UNIVERSAL, who);break; + case 1: DoSay(SAY_AGGRO_2, LANG_UNIVERSAL, who);break; + } + } + + void UpdateAI(const uint32 diff) + { + npc_escortAI::UpdateAI(diff); + } +}; + +bool QuestAccept_npc_deathstalker_erland(Player* player, Creature* creature, Quest const* quest) +{ + if (quest->GetQuestId() == QUEST_ESCORTING) + { + creature->Say(SAY_QUESTACCEPT, LANG_UNIVERSAL, player->GetGUID()); + ((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID()); + } + + return true; +} + +CreatureAI* GetAI_npc_deathstalker_erlandAI(Creature *_Creature) +{ + npc_deathstalker_erlandAI* deathstalker_erlandAI = new npc_deathstalker_erlandAI(_Creature); + + deathstalker_erlandAI->AddWaypoint(0, 1406.32, 1083.10, 52.55); + deathstalker_erlandAI->AddWaypoint(1, 1400.49, 1080.42, 52.50); //first say + deathstalker_erlandAI->AddWaypoint(2, 1388.48, 1083.10, 52.52); + deathstalker_erlandAI->AddWaypoint(3, 1370.16, 1084.02, 52.30); + deathstalker_erlandAI->AddWaypoint(4, 1359.02, 1080.85, 52.46); + deathstalker_erlandAI->AddWaypoint(5, 1341.43, 1087.39, 52.69); + deathstalker_erlandAI->AddWaypoint(6, 1321.93, 1090.51, 50.66); + deathstalker_erlandAI->AddWaypoint(7, 1312.98, 1095.91, 47.49); + deathstalker_erlandAI->AddWaypoint(8, 1301.09, 1102.94, 47.76); + deathstalker_erlandAI->AddWaypoint(9, 1297.73, 1106.35, 50.18); + deathstalker_erlandAI->AddWaypoint(10, 1295.49, 1124.32, 50.49); + deathstalker_erlandAI->AddWaypoint(11, 1294.84, 1137.25, 51.75); + deathstalker_erlandAI->AddWaypoint(12, 1292.89, 1158.99, 52.65); + deathstalker_erlandAI->AddWaypoint(13, 1290.75, 1168.67, 52.56, 1000); //complete quest and say last + deathstalker_erlandAI->AddWaypoint(14, 1287.12, 1203.49, 52.66, 5000); + deathstalker_erlandAI->AddWaypoint(15, 1287.12, 1203.49, 52.66, 4000); + deathstalker_erlandAI->AddWaypoint(16, 1287.12, 1203.49, 52.66, 5000); + deathstalker_erlandAI->AddWaypoint(17, 1287.12, 1203.49, 52.66, 4000); + deathstalker_erlandAI->AddWaypoint(18, 1290.72, 1207.44, 52.69); + deathstalker_erlandAI->AddWaypoint(19, 1297.50, 1207.18, 53.74); + deathstalker_erlandAI->AddWaypoint(20, 1301.32, 1220.90, 53.74); + deathstalker_erlandAI->AddWaypoint(21, 1298.55, 1220.43, 53.74); + deathstalker_erlandAI->AddWaypoint(22, 1297.59, 1211.23, 58.47); + deathstalker_erlandAI->AddWaypoint(23, 1305.01, 1206.10, 58.51); + deathstalker_erlandAI->AddWaypoint(24, 1310.51, 1207.36, 58.51, 5000); + deathstalker_erlandAI->AddWaypoint(25, 1310.51, 1207.36, 58.51, 5000); + deathstalker_erlandAI->AddWaypoint(26, 1310.51, 1207.36, 58.51, 2000); + + return (CreatureAI*)deathstalker_erlandAI; +} + /*###### ## AddSC ######*/ @@ -97,4 +221,10 @@ void AddSC_silverpine_forest() newscript->pGossipSelect = &GossipSelect_npc_astor_hadren; newscript->GetAI = &GetAI_npc_astor_hadren; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="npc_deathstalker_erland"; + newscript->GetAI = &GetAI_npc_deathstalker_erlandAI; + newscript->pQuestAccept = &QuestAccept_npc_deathstalker_erland; + newscript->RegisterSelf(); } -- cgit v1.2.3