From f2136eaeeffddf3a96e93635aec2997f71bb0623 Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Sat, 8 Sep 2012 02:44:44 +0200 Subject: DB/Creatures: Fix Kologarn InhabitType --- sql/updates/world/2012_09_08_01_world_creature_template.sql | 1 + 1 file changed, 1 insertion(+) create mode 100644 sql/updates/world/2012_09_08_01_world_creature_template.sql (limited to 'sql') diff --git a/sql/updates/world/2012_09_08_01_world_creature_template.sql b/sql/updates/world/2012_09_08_01_world_creature_template.sql new file mode 100644 index 00000000000..fb34f345f2d --- /dev/null +++ b/sql/updates/world/2012_09_08_01_world_creature_template.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `InhabitType`=4 WHERE `entry` IN (32930,33909); -- Kologarn -- cgit v1.2.3 From b03b11232705270c4668564e835bc3049e26d567 Mon Sep 17 00:00:00 2001 From: Nay Date: Sat, 8 Sep 2012 15:28:00 +0100 Subject: SQL: Update characters_database.sql --- sql/base/characters_database.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sql') diff --git a/sql/base/characters_database.sql b/sql/base/characters_database.sql index bbd5a70e933..d2ec0a94a2b 100644 --- a/sql/base/characters_database.sql +++ b/sql/base/characters_database.sql @@ -1129,7 +1129,7 @@ DROP TABLE IF EXISTS `characters`; CREATE TABLE `characters` ( `guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier', `account` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Account Identifier', - `name` varchar(12) NOT NULL DEFAULT '', + `name` varchar(12) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `race` tinyint(3) unsigned NOT NULL DEFAULT '0', `class` tinyint(3) unsigned NOT NULL DEFAULT '0', `gender` tinyint(3) unsigned NOT NULL DEFAULT '0', @@ -2276,4 +2276,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2012-03-25 21:14:19 +-- Dump completed on 2012-09-08 15:27:29 -- cgit v1.2.3 From 158a86cf11ed6b5d7e5be592cc00bc4aa51e59c2 Mon Sep 17 00:00:00 2001 From: Subv Date: Sat, 8 Sep 2012 13:12:07 -0500 Subject: SQL/Achievements: Fixed achievement "Wrecking Ball" It should only count player deaths. closes #1734 --- .../world/2012_09_08_02_world_achievement_criteria_data.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 sql/updates/world/2012_09_08_02_world_achievement_criteria_data.sql (limited to 'sql') diff --git a/sql/updates/world/2012_09_08_02_world_achievement_criteria_data.sql b/sql/updates/world/2012_09_08_02_world_achievement_criteria_data.sql new file mode 100644 index 00000000000..2f25f6f20fa --- /dev/null +++ b/sql/updates/world/2012_09_08_02_world_achievement_criteria_data.sql @@ -0,0 +1,10 @@ +-- Criteria data for achievement 'Wrecking Ball' +DELETE FROM `disables` WHERE `sourceType`=4 AND `entry` IN (3368, 3369, 3370, 12578, 7623, 3371); +DELETE FROM `achievement_criteria_data` WHERE `criteria_id` IN (3368, 3369, 3370, 12578, 7623, 3371); +INSERT INTO `achievement_criteria_data`(`criteria_id`,`type`,`value1`,`value2`,`ScriptName`) VALUES +(3368,2,0,0,''), +(3369,2,0,0,''), +(3370,2,0,0,''), +(12578,2,0,0,''), +(7623,2,0,0,''), +(3371,2,0,0,''); -- cgit v1.2.3 From 5cd9910463b9bad187c3dbdcd06350a329fc823e Mon Sep 17 00:00:00 2001 From: Myran2 Date: Sat, 8 Sep 2012 18:59:06 -0400 Subject: Core/Commands: Replaced .start with a new command, .unstuck. Usage information can be found by typing .unstuck in-game --- sql/updates/world/2012_8_31_00_world_command.sql | 2 + .../world/2012_8_31_01_world_trinity_string.sql | 2 + src/server/game/Miscellaneous/Language.h | 3 +- src/server/scripts/Commands/cs_misc.cpp | 63 +++++++++++++++++----- 4 files changed, 55 insertions(+), 15 deletions(-) create mode 100644 sql/updates/world/2012_8_31_00_world_command.sql create mode 100644 sql/updates/world/2012_8_31_01_world_trinity_string.sql (limited to 'sql') diff --git a/sql/updates/world/2012_8_31_00_world_command.sql b/sql/updates/world/2012_8_31_00_world_command.sql new file mode 100644 index 00000000000..28e70f3fa72 --- /dev/null +++ b/sql/updates/world/2012_8_31_00_world_command.sql @@ -0,0 +1,2 @@ +DELETE FROM `command` WHERE `name` = 'start'; +INSERT INTO `command` (`name`, `security`, `help`) VALUES ('unstuck', 0, 'Syntax: .unstuck $playername [inn/graveyard/startzone]\r\n\r\nTeleports specified player to specified location. Default location is player\'s current hearth location.'); \ No newline at end of file diff --git a/sql/updates/world/2012_8_31_01_world_trinity_string.sql b/sql/updates/world/2012_8_31_01_world_trinity_string.sql new file mode 100644 index 00000000000..701c85bce9c --- /dev/null +++ b/sql/updates/world/2012_8_31_01_world_trinity_string.sql @@ -0,0 +1,2 @@ +DELETE FROM `trinity_string` WHERE `entry`=63 LIMIT 1; --Existing entry 63 is not present in Language.h. It's safe to remove it. +INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES (63, 'You can\'t do that right now.'); diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index a766108dbb0..9c4f760fcff 100755 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -86,7 +86,8 @@ enum TrinityStrings LANG_CONNECTED_PLAYERS = 60, LANG_ACCOUNT_ADDON = 61, LANG_IMPROPER_VALUE = 62, - // Room for more level 0 63-99 not used + LANG_CANT_DO_NOW = 63, + // Room for more level 0 64-99 not used // level 1 chat LANG_GLOBAL_NOTIFY = 100, diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index fea96cc80f3..d985671997a 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -81,7 +81,7 @@ public: { "save", SEC_PLAYER, false, &HandleSaveCommand, "", NULL }, { "saveall", SEC_MODERATOR, true, &HandleSaveAllCommand, "", NULL }, { "kick", SEC_GAMEMASTER, true, &HandleKickPlayerCommand, "", NULL }, - { "start", SEC_PLAYER, false, &HandleStartCommand, "", NULL }, + { "unstuck", SEC_PLAYER, true, &HandleUnstuckCommand, "", NULL }, { "linkgrave", SEC_ADMINISTRATOR, false, &HandleLinkGraveCommand, "", NULL }, { "neargrave", SEC_ADMINISTRATOR, false, &HandleNearGraveCommand, "", NULL }, { "showarea", SEC_ADMINISTRATOR, false, &HandleShowAreaCommand, "", NULL }, @@ -928,34 +928,69 @@ public: return true; } - static bool HandleStartCommand(ChatHandler* handler, char const* /*args*/) + static bool HandleUnstuckCommand(ChatHandler* handler, char const* args) { - Player* player = handler->GetSession()->GetPlayer(); + //No args required for players + if (handler->GetSession() && AccountMgr::IsPlayerAccount(handler->GetSession()->GetSecurity())) + { + Player* player = handler->GetSession()->GetPlayer(); + if (player->isInFlight() || player->isInCombat()) + { + handler->SendSysMessage(LANG_CANT_DO_NOW); + handler->SetSentErrorMessage(true); + return false; + } + + //7355: "Stuck" + player->CastSpell(player, 7355, false); + return true; + } + + if (!*args) + return false; + + char* player_str = strtok((char*)args, " "); + if (!player_str) + return false; - if (player->isInFlight()) + char* location_str = strtok(NULL, ""); + if (!location_str) + location_str = "inn"; + + Player* player = NULL; + std::string playerName; + if (!handler->extractPlayerTarget((char*)player_str, &player, NULL, &playerName)) + return false; + + if (player->isInFlight() || player->isInCombat()) { - handler->SendSysMessage(LANG_YOU_IN_FLIGHT); + handler->SendSysMessage(LANG_CANT_DO_NOW); handler->SetSentErrorMessage(true); return false; } - if (player->isInCombat()) + if (!stricmp(location_str, "inn")) { - handler->SendSysMessage(LANG_YOU_IN_COMBAT); - handler->SetSentErrorMessage(true); - return false; + player->TeleportTo(player->m_homebindMapId, player->m_homebindX, player->m_homebindY, player->m_homebindZ, player->GetOrientation()); + return true; } - if (player->isDead() || player->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_GHOST)) + if (!stricmp(location_str, "graveyard")) { - // if player is dead and stuck, send ghost to graveyard player->RepopAtGraveyard(); return true; } - // cast spell Stuck - player->CastSpell(player, 7355, false); - return true; + if (!stricmp(location_str, "startzone")) + { + player->TeleportTo(player->GetStartPosition()); + return true; + } + + //Not a supported argument + sLog->outError(LOG_FILTER_GENERAL, "DEBUG: not a supported argument. Args were: %s", args); + return false; + } static bool HandleLinkGraveCommand(ChatHandler* handler, char const* args) -- cgit v1.2.3 From d04f155b6529e3d86fca931075775fd34b544e29 Mon Sep 17 00:00:00 2001 From: Nay Date: Sun, 9 Sep 2012 00:10:23 +0100 Subject: Corrections to previous merged in PR --- sql/updates/world/2012_09_09_00_world_command.sql | 4 ++++ sql/updates/world/2012_09_09_01_world_trinity_string.sql | 3 +++ sql/updates/world/2012_8_31_00_world_command.sql | 2 -- sql/updates/world/2012_8_31_01_world_trinity_string.sql | 2 -- src/server/game/Entities/Player/Player.cpp | 2 +- src/server/game/Entities/Unit/Unit.cpp | 4 ++-- src/server/game/Handlers/CharacterHandler.cpp | 4 ++-- src/server/scripts/Commands/cs_misc.cpp | 6 +++--- 8 files changed, 15 insertions(+), 12 deletions(-) create mode 100644 sql/updates/world/2012_09_09_00_world_command.sql create mode 100644 sql/updates/world/2012_09_09_01_world_trinity_string.sql delete mode 100644 sql/updates/world/2012_8_31_00_world_command.sql delete mode 100644 sql/updates/world/2012_8_31_01_world_trinity_string.sql (limited to 'sql') diff --git a/sql/updates/world/2012_09_09_00_world_command.sql b/sql/updates/world/2012_09_09_00_world_command.sql new file mode 100644 index 00000000000..1fb3247bfbb --- /dev/null +++ b/sql/updates/world/2012_09_09_00_world_command.sql @@ -0,0 +1,4 @@ +DELETE FROM `command` WHERE `name` = 'start'; +DELETE FROM `command` WHERE `name` = 'unstuck'; +INSERT INTO `command` (`name`, `security`, `help`) VALUES +('unstuck', 0, 'Syntax: .unstuck $playername [inn/graveyard/startzone]\n\nTeleports specified player to specified location. Default location is player\'s current hearth location.'); diff --git a/sql/updates/world/2012_09_09_01_world_trinity_string.sql b/sql/updates/world/2012_09_09_01_world_trinity_string.sql new file mode 100644 index 00000000000..2f3c0aa1938 --- /dev/null +++ b/sql/updates/world/2012_09_09_01_world_trinity_string.sql @@ -0,0 +1,3 @@ +DELETE FROM `trinity_string` WHERE `entry`=63; -- Existing entry 63 is not present in Language.h. It's safe to remove it. +INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES +(63, 'You can''t do that right now.'); diff --git a/sql/updates/world/2012_8_31_00_world_command.sql b/sql/updates/world/2012_8_31_00_world_command.sql deleted file mode 100644 index 28e70f3fa72..00000000000 --- a/sql/updates/world/2012_8_31_00_world_command.sql +++ /dev/null @@ -1,2 +0,0 @@ -DELETE FROM `command` WHERE `name` = 'start'; -INSERT INTO `command` (`name`, `security`, `help`) VALUES ('unstuck', 0, 'Syntax: .unstuck $playername [inn/graveyard/startzone]\r\n\r\nTeleports specified player to specified location. Default location is player\'s current hearth location.'); \ No newline at end of file diff --git a/sql/updates/world/2012_8_31_01_world_trinity_string.sql b/sql/updates/world/2012_8_31_01_world_trinity_string.sql deleted file mode 100644 index 701c85bce9c..00000000000 --- a/sql/updates/world/2012_8_31_01_world_trinity_string.sql +++ /dev/null @@ -1,2 +0,0 @@ -DELETE FROM `trinity_string` WHERE `entry`=63 LIMIT 1; --Existing entry 63 is not present in Language.h. It's safe to remove it. -INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES (63, 'You can\'t do that right now.'); diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 55d90ba1c18..dc3fe6b0f0b 100755 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -14726,7 +14726,7 @@ bool Player::CanSeeStartQuest(Quest const* quest) bool Player::CanTakeQuest(Quest const* quest, bool msg) { - return !DisableMgr::IsDisabledFor(DISABLE_TYPE_QUEST, quest->GetQuestId(), this) + return !DisableMgr::IsDisabledFor(DISABLE_TYPE_QUEST, quest->GetQuestId(), this) && SatisfyQuestStatus(quest, msg) && SatisfyQuestExclusiveGroup(quest, msg) && SatisfyQuestClass(quest, msg) && SatisfyQuestRace(quest, msg) && SatisfyQuestLevel(quest, msg) && SatisfyQuestSkill(quest, msg) && SatisfyQuestReputation(quest, msg) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 1c43c8edd62..737d75cdf1c 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -4367,10 +4367,10 @@ int32 Unit::GetTotalAuraModifierByMiscMask(AuraType auratype, uint32 misc_mask) if ((*i)->GetMiscValue() & misc_mask) if (!sSpellMgr->AddSameEffectStackRuleSpellGroups((*i)->GetSpellInfo(), (*i)->GetAmount(), SameEffectSpellGroup)) modifier += (*i)->GetAmount(); - + for (std::map::const_iterator itr = SameEffectSpellGroup.begin(); itr != SameEffectSpellGroup.end(); ++itr) modifier += itr->second; - + return modifier; } diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 5080d668702..39704828d7f 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -1312,7 +1312,7 @@ void WorldSession::HandleAlterAppearance(WorldPacket & recv_data) if (!go) { WorldPacket data(SMSG_BARBER_SHOP_RESULT, 4); - data << uint32(2); + data << uint32(2); SendPacket(&data); return; } @@ -1320,7 +1320,7 @@ void WorldSession::HandleAlterAppearance(WorldPacket & recv_data) if (_player->getStandState() != UNIT_STAND_STATE_SIT_LOW_CHAIR + go->GetGOInfo()->barberChair.chairheight) { WorldPacket data(SMSG_BARBER_SHOP_RESULT, 4); - data << uint32(2); + data << uint32(2); SendPacket(&data); return; } diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 835204e1eb9..1778dc9be67 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -940,15 +940,15 @@ public: handler->SetSentErrorMessage(true); return false; } - + //7355: "Stuck" player->CastSpell(player, 7355, false); return true; } - + if (!*args) return false; - + char* player_str = strtok((char*)args, " "); if (!player_str) return false; -- cgit v1.2.3