aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2014_09_12_00_world_misc.sql34
-rw-r--r--sql/updates/world/2014_09_12_01_world_misc.sql4
-rw-r--r--src/server/game/Groups/Group.cpp2
-rw-r--r--src/server/game/Groups/Group.h14
-rw-r--r--src/server/scripts/Outland/zone_shattrath_city.cpp69
-rw-r--r--src/server/scripts/World/npcs_special.cpp97
-rw-r--r--src/server/shared/Networking/NetworkThread.h4
-rw-r--r--src/server/shared/Networking/SocketMgr.h6
8 files changed, 52 insertions, 178 deletions
diff --git a/sql/updates/world/2014_09_12_00_world_misc.sql b/sql/updates/world/2014_09_12_00_world_misc.sql
new file mode 100644
index 00000000000..e36e4012ca9
--- /dev/null
+++ b/sql/updates/world/2014_09_12_00_world_misc.sql
@@ -0,0 +1,34 @@
+UPDATE `creature_template` SET `ScriptName`='' WHERE `entry` =3362;
+
+DELETE FROM `creature_text` WHERE `entry` IN(18407,18166);
+INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`, `BroadcastTextID`) VALUES
+(18407, 0, 0, 'Damn those ogres. Damn them to the Nether. Won''t someone save us from these savages! This is the fifth kidnapping in as many days.', 12, 1, 100, 0, 0, 0, 'Warden Bullrok',15371),
+(18407, 1, 0, 'That''s the best reward we''re going to be able to offer. Hopefully someone accepts the mission.', 12, 1, 100, 1, 0, 0, 'Warden Bullrok',15372),
+(18166, 0, 0, 'Do not burden A''dal with mundane questions, $r. This being''s will is all that keeps our enemies from crushing this city.', 12, 0, 100, 0, 0, 0, 'Khadgar',17238),
+(18166, 1, 0, 'Show our guest around Shattrath, will you? Keep an eye out for pickpockets in the Lower City.', 12, 0, 100, 0, 0, 0, 'Khadgar',17266);
+
+UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='' WHERE `entry`=18166;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`IN(18407,18166) AND `source_type`=0;
+DELETE FROM `smart_scripts` WHERE `entryorguid`=18481 AND `source_type`=0 AND `id`=2;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid`=1840700 AND `source_type`=9;
+
+INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
+(18407, 0, 0, 0, 1, 0, 100, 0, 60000, 60000, 120000, 240000, 80, 1840700, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Warden Bullrok - Out of Combat - Run Script'),
+(18481, 0, 2, 0, 20, 0, 100, 0, 10210, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 19, 18166, 0, 0, 0, 0, 0, 0, 'A\'dal - On Quest Reward (A''DAL) - Say line 0 on Khadgar'),
+(18166, 0, 0, 0, 19, 0, 100, 0, 10211, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Khadgar - On Quest Accept (City of Lights) - Say Line 1'),
+(1840700, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 71, 0, 0, 1903, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Warden Bullrok - Script - Equip Virtual Item 1903 to Slot 1'),
+(1840700, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 2.96706, 'Warden Bullrok - Script - Set Orientation'),
+(1840700, 9, 2, 0, 0, 0, 100, 0, 2000, 2000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Warden Bullrok - Script - Play emote STATE_WORK_CHOPWOOD'),
+(1840700, 9, 3, 0, 0, 0, 100, 0, 0, 0, 0, 0, 17, 234, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Warden Bullrok - Script - Say Line 1'),
+(1840700, 9, 4, 0, 0, 0, 100, 0, 15000, 15000, 0, 0, 17, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Warden Bullrok - Script - Play emote ONESHOT_NONE'),
+(1840700, 9, 5, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Warden Bullrok - Script - Say Line 1'),
+(1840700, 9, 6, 0, 0, 0, 100, 0, 3000, 3000, 0, 0, 66, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0.6283185, 'Warden Bullrok - Script - Set Orientation'),
+(1840700, 9, 7, 0, 0, 0, 100, 0, 0, 0, 0, 0, 71, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Warden Bullrok - Script - Unequip Virtual Item');
+
+UPDATE `gossip_menu` SET `text_id`=5841 WHERE `entry`=3161 AND `text_id`=3841;
+UPDATE `conditions` SET `SourceEntry`=5843 WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=4006 AND `SourceEntry`=4840 AND `SourceId`=0 AND `ElseGroup`=0 AND `ConditionTypeOrReference`=5 AND `ConditionTarget`=0 AND `ConditionValue1`=81 AND `ConditionValue2`=128 AND `ConditionValue3`=0;
+UPDATE `conditions` SET `SourceEntry`=5843 WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=4006 AND `SourceEntry`=4840 AND `SourceId`=0 AND `ElseGroup`=0 AND `ConditionTypeOrReference`=16 AND `ConditionTarget`=0 AND `ConditionValue1`=32 AND `ConditionValue2`=0 AND `ConditionValue3`=0;
+UPDATE `conditions` SET `SourceEntry`=5855 WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=4004 AND `SourceEntry`=4855 AND `SourceId`=0 AND `ElseGroup`=0 AND `ConditionTypeOrReference`=5 AND `ConditionTarget`=0 AND `ConditionValue1`=72 AND `ConditionValue2`=128 AND `ConditionValue3`=0;
+UPDATE `conditions` SET `SourceEntry`=5855 WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=4004 AND `SourceEntry`=4855 AND `SourceId`=0 AND `ElseGroup`=0 AND `ConditionTypeOrReference`=16 AND `ConditionTarget`=0 AND `ConditionValue1`=1 AND `ConditionValue2`=0 AND `ConditionValue3`=0;
diff --git a/sql/updates/world/2014_09_12_01_world_misc.sql b/sql/updates/world/2014_09_12_01_world_misc.sql
new file mode 100644
index 00000000000..71cb62477d4
--- /dev/null
+++ b/sql/updates/world/2014_09_12_01_world_misc.sql
@@ -0,0 +1,4 @@
+UPDATE `conditions` SET `SourceEntry`=5841 WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=3161 AND `SourceEntry`=3841 AND `SourceId`=0 AND `ElseGroup`=0 AND `ConditionTypeOrReference`=16 AND `ConditionTarget`=0 AND `ConditionValue1`=2 AND `ConditionValue2`=0 AND `ConditionValue3`=0;
+UPDATE `conditions` SET `SourceEntry`=5841 WHERE `SourceTypeOrReferenceId`=14 AND `SourceGroup`=3161 AND `SourceEntry`=3841 AND `SourceId`=0 AND `ElseGroup`=0 AND `ConditionTypeOrReference`=5 AND `ConditionTarget`=0 AND `ConditionValue1`=76 AND `ConditionValue2`=128 AND `ConditionValue3`=0;
+
+UPDATE `creature_template` SET `flags_extra`=0 WHERE `entry` IN(24928,25115);
diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp
index 88a83ab6fde..4becedfe41a 100644
--- a/src/server/game/Groups/Group.cpp
+++ b/src/server/game/Groups/Group.cpp
@@ -226,7 +226,7 @@ void Group::LoadMemberFromDB(uint32 guidLow, uint8 memberFlags, uint8 subgroup,
void Group::ConvertToLFG()
{
- m_groupType = GroupType(m_groupType | GROUPTYPE_LFG | GROUPTYPE_UNK1);
+ m_groupType = GroupType(m_groupType | GROUPTYPE_LFG | GROUPTYPE_LFG_RESTRICTED);
m_lootMethod = NEED_BEFORE_GREED;
if (!isBGGroup() && !isBFGroup())
{
diff --git a/src/server/game/Groups/Group.h b/src/server/game/Groups/Group.h
index 08f91ca816a..59f77a06308 100644
--- a/src/server/game/Groups/Group.h
+++ b/src/server/game/Groups/Group.h
@@ -82,13 +82,15 @@ enum GroupMemberAssignment
enum GroupType
{
- GROUPTYPE_NORMAL = 0x00,
- GROUPTYPE_BG = 0x01,
- GROUPTYPE_RAID = 0x02,
- GROUPTYPE_BGRAID = GROUPTYPE_BG | GROUPTYPE_RAID, // mask
- GROUPTYPE_UNK1 = 0x04,
- GROUPTYPE_LFG = 0x08
+ GROUPTYPE_NORMAL = 0x00,
+ GROUPTYPE_BG = 0x01,
+ GROUPTYPE_RAID = 0x02,
+ GROUPTYPE_BGRAID = GROUPTYPE_BG | GROUPTYPE_RAID, // mask
+ GROUPTYPE_LFG_RESTRICTED = 0x04, // Script_HasLFGRestrictions()
+ GROUPTYPE_LFG = 0x08,
// 0x10, leave/change group?, I saw this flag when leaving group and after leaving BG while in group
+ // GROUPTYPE_ONE_PERSON_PARTY = 0x20, 4.x Script_IsOnePersonParty()
+ // GROUPTYPE_EVERYONE_ASSISTANT = 0x40 4.x Script_IsEveryoneAssistant()
};
enum GroupUpdateFlags
diff --git a/src/server/scripts/Outland/zone_shattrath_city.cpp b/src/server/scripts/Outland/zone_shattrath_city.cpp
index 9a62cde005c..c2e7df19ca1 100644
--- a/src/server/scripts/Outland/zone_shattrath_city.cpp
+++ b/src/server/scripts/Outland/zone_shattrath_city.cpp
@@ -30,7 +30,6 @@ npc_shattrathflaskvendors
npc_zephyr
npc_kservant
npc_ishanah
-npc_khadgar
EndContentData */
#include "ScriptMgr.h"
@@ -469,73 +468,6 @@ public:
}
};
-/*######
-# npc_khadgar
-######*/
-
-#define KHADGAR_GOSSIP_1 "I've heard your name spoken only in whispers, mage. Who are you?"
-#define KHADGAR_GOSSIP_2 "Go on, please."
-#define KHADGAR_GOSSIP_3 "I see." //6th too this
-#define KHADGAR_GOSSIP_4 "What did you do then?"
-#define KHADGAR_GOSSIP_5 "What happened next?"
-#define KHADGAR_GOSSIP_7 "There was something else I wanted to ask you."
-
-class npc_khadgar : public CreatureScript
-{
-public:
- npc_khadgar() : CreatureScript("npc_khadgar") { }
-
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
- {
- player->PlayerTalkClass->ClearMenus();
- switch (action)
- {
- case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
- player->SEND_GOSSIP_MENU(9876, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+2:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
- player->SEND_GOSSIP_MENU(9877, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+3:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
- player->SEND_GOSSIP_MENU(9878, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+4:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
- player->SEND_GOSSIP_MENU(9879, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+5:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6);
- player->SEND_GOSSIP_MENU(9880, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+6:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7);
- player->SEND_GOSSIP_MENU(9881, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+7:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
- player->SEND_GOSSIP_MENU(9243, creature->GetGUID());
- break;
- }
- return true;
- }
-
- bool OnGossipHello(Player* player, Creature* creature) override
- {
- if (creature->IsQuestGiver())
- player->PrepareQuestMenu(creature->GetGUID());
-
- if (player->GetQuestStatus(10211) != QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, KHADGAR_GOSSIP_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
-
- player->SEND_GOSSIP_MENU(9243, creature->GetGUID());
-
- return true;
- }
-};
-
void AddSC_shattrath_city()
{
new npc_raliq_the_drunk();
@@ -544,5 +476,4 @@ void AddSC_shattrath_city()
new npc_zephyr();
new npc_kservant();
new npc_ishanah();
- new npc_khadgar();
}
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index 944ebe27b7b..ff42743c496 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -33,7 +33,6 @@ npc_guardian 100% guardianAI used to prevent players from accessin
npc_garments_of_quests 80% NPC's related to all Garments of-quests 5621, 5624, 5625, 5648, 565
npc_injured_patient 100% patients for triage-quests (6622 and 6624)
npc_doctor 100% Gustaf Vanhowzen and Gregory Victor, quest 6622 and 6624 (Triage)
-npc_mount_vendor 100% Regular mount vendors all over the world. Display gossip if player doesn't meet the requirements to buy
npc_sayge 100% Darkmoon event fortune teller, buff player based on answers given
npc_snake_trap_serpents 80% AI for snakes that summoned by Snake Trap
npc_shadowfiend 100% restore 5% of owner's mana when shadowfiend die from damage
@@ -1176,101 +1175,6 @@ public:
};
/*######
-## npc_mount_vendor
-######*/
-
-class npc_mount_vendor : public CreatureScript
-{
-public:
- npc_mount_vendor() : CreatureScript("npc_mount_vendor") { }
-
- bool OnGossipHello(Player* player, Creature* creature) override
- {
- if (creature->IsQuestGiver())
- player->PrepareQuestMenu(creature->GetGUID());
-
- bool canBuy = false;
- uint32 vendor = creature->GetEntry();
- uint8 race = player->getRace();
-
- switch (vendor)
- {
- case 384: //Katie Hunter
- case 1460: //Unger Statforth
- case 2357: //Merideth Carlson
- case 4885: //Gregor MacVince
- if (player->GetReputationRank(72) != REP_EXALTED && race != RACE_HUMAN)
- player->SEND_GOSSIP_MENU(5855, creature->GetGUID());
- else canBuy = true;
- break;
- case 1261: //Veron Amberstill
- if (player->GetReputationRank(47) != REP_EXALTED && race != RACE_DWARF)
- player->SEND_GOSSIP_MENU(5856, creature->GetGUID());
- else canBuy = true;
- break;
- case 3362: //Ogunaro Wolfrunner
- if (player->GetReputationRank(76) != REP_EXALTED && race != RACE_ORC)
- player->SEND_GOSSIP_MENU(5841, creature->GetGUID());
- else canBuy = true;
- break;
- case 3685: //Harb Clawhoof
- if (player->GetReputationRank(81) != REP_EXALTED && race != RACE_TAUREN)
- player->SEND_GOSSIP_MENU(5843, creature->GetGUID());
- else canBuy = true;
- break;
- case 4730: //Lelanai
- if (player->GetReputationRank(69) != REP_EXALTED && race != RACE_NIGHTELF)
- player->SEND_GOSSIP_MENU(5844, creature->GetGUID());
- else canBuy = true;
- break;
- case 4731: //Zachariah Post
- if (player->GetReputationRank(68) != REP_EXALTED && race != RACE_UNDEAD_PLAYER)
- player->SEND_GOSSIP_MENU(5840, creature->GetGUID());
- else canBuy = true;
- break;
- case 7952: //Zjolnir
- if (player->GetReputationRank(530) != REP_EXALTED && race != RACE_TROLL)
- player->SEND_GOSSIP_MENU(5842, creature->GetGUID());
- else canBuy = true;
- break;
- case 7955: //Milli Featherwhistle
- if (player->GetReputationRank(54) != REP_EXALTED && race != RACE_GNOME)
- player->SEND_GOSSIP_MENU(5857, creature->GetGUID());
- else canBuy = true;
- break;
- case 16264: //Winaestra
- if (player->GetReputationRank(911) != REP_EXALTED && race != RACE_BLOODELF)
- player->SEND_GOSSIP_MENU(10305, creature->GetGUID());
- else canBuy = true;
- break;
- case 17584: //Torallius the Pack Handler
- if (player->GetReputationRank(930) != REP_EXALTED && race != RACE_DRAENEI)
- player->SEND_GOSSIP_MENU(10239, creature->GetGUID());
- else canBuy = true;
- break;
- }
-
- if (canBuy)
- {
- if (creature->IsVendor())
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
- player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
- }
- return true;
- }
-
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override
- {
- player->PlayerTalkClass->ClearMenus();
- if (action == GOSSIP_ACTION_TRADE)
- player->GetSession()->SendListInventory(creature->GetGUID());
-
- return true;
- }
-};
-
-
-/*######
## npc_sayge
######*/
@@ -2490,7 +2394,6 @@ void AddSC_npcs_special()
new npc_injured_patient();
new npc_garments_of_quests();
new npc_guardian();
- new npc_mount_vendor();
new npc_sayge();
new npc_steam_tonk();
new npc_tonk_mine();
diff --git a/src/server/shared/Networking/NetworkThread.h b/src/server/shared/Networking/NetworkThread.h
index 5ed7f25ed77..043aee56504 100644
--- a/src/server/shared/Networking/NetworkThread.h
+++ b/src/server/shared/Networking/NetworkThread.h
@@ -85,8 +85,8 @@ public:
}
protected:
- virtual void SocketAdded(std::shared_ptr<SocketType> sock) { }
- virtual void SocketRemoved(std::shared_ptr<SocketType> sock) { }
+ virtual void SocketAdded(std::shared_ptr<SocketType> /*sock*/) { }
+ virtual void SocketRemoved(std::shared_ptr<SocketType> /*sock*/) { }
void AddNewSockets()
{
diff --git a/src/server/shared/Networking/SocketMgr.h b/src/server/shared/Networking/SocketMgr.h
index ed638ab89f3..47bd7794a4c 100644
--- a/src/server/shared/Networking/SocketMgr.h
+++ b/src/server/shared/Networking/SocketMgr.h
@@ -60,7 +60,7 @@ public:
virtual void StopNetwork()
{
if (_threadCount != 0)
- for (size_t i = 0; i < _threadCount; ++i)
+ for (int32 i = 0; i < _threadCount; ++i)
_threads[i].Stop();
Wait();
@@ -69,7 +69,7 @@ public:
void Wait()
{
if (_threadCount != 0)
- for (size_t i = 0; i < _threadCount; ++i)
+ for (int32 i = 0; i < _threadCount; ++i)
_threads[i].Wait();
}
@@ -77,7 +77,7 @@ public:
{
size_t min = 0;
- for (size_t i = 1; i < _threadCount; ++i)
+ for (int32 i = 1; i < _threadCount; ++i)
if (_threads[i].GetConnectionCount() < _threads[min].GetConnectionCount())
min = i;