*Merge.
--HG-- branch : trunk
This commit is contained in:
@@ -13,7 +13,6 @@ src/bindings/scripts/VC90/*/
|
||||
src/mangosd/
|
||||
src/realmd/
|
||||
*.*-*
|
||||
*
|
||||
|
||||
# use regexp syntax.
|
||||
syntax: regexp
|
||||
|
||||
@@ -999,6 +999,7 @@ INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content
|
||||
(-1543014, 'Die, weakling!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10282, 1, 0, 0, 'omor SAY_KILL_1'),
|
||||
(-1543015, 'It is... not over.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10284, 1, 0, 0, 'omor SAY_DIE'),
|
||||
(-1543016, 'I am victorious!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10283, 1, 0, 0, 'omor SAY_WIPE'),
|
||||
|
||||
(-1543017, 'You have faced many challenges, pity they were all in vain. Soon your people will kneel to my lord!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10292, 1, 0, 0, 'vazruden SAY_INTRO'),
|
||||
(-1543018, 'Is there no one left to test me?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10293, 1, 0, 0, 'vazruden SAY_WIPE'),
|
||||
(-1543019, 'Your time is running out!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 10294, 1, 0, 0, 'vazruden SAY_AGGRO_1'),
|
||||
|
||||
@@ -13,6 +13,13 @@ CREATE TABLE script_waypoint (
|
||||
PRIMARY KEY (entry, pointid)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Script Creature waypoints';
|
||||
|
||||
DELETE FROM script_waypoint WHERE entry=24358;
|
||||
INSERT INTO script_waypoint VALUES
|
||||
(24358, 0, 121.193970, 1645.619385, 42.021, 0, ''),
|
||||
(24358, 1, 132.051468, 1642.176025, 42.021, 5000, 'SAY_AT_GONG'),
|
||||
(24358, 2, 120.670631, 1636.346802, 42.415, 0, ''),
|
||||
(24358, 3, 120.536003, 1611.654663, 43.473, 10000, 'SAY_OPEN_ENTRANCE'),
|
||||
(24358, 4, 120.536003, 1611.654663, 43.473, 0, '');
|
||||
|
||||
DELETE FROM script_waypoint WHERE entry=16295;
|
||||
INSERT INTO script_waypoint VALUES
|
||||
|
||||
@@ -83,6 +83,7 @@ UPDATE `item_template` SET `ScriptName`='item_only_for_flight' WHERE `entry` IN
|
||||
UPDATE `item_template` SET `ScriptName`='item_inoculating_crystal' WHERE `entry`=22962;
|
||||
|
||||
/* NPC (usually creatures to be found in more than one specific zone) */
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_air_force_bots' WHERE `entry` IN (2614, 2615, 21974, 21993, 21996, 21997, 21999, 22001, 22002, 22003, 22063, 22065, 22066, 22068, 22069, 22070, 22071, 22078, 22079, 22080, 22086, 22087, 22088, 22090, 22124, 22125, 22126);
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_chicken_cluck' WHERE `entry`=620;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_dancing_flames' WHERE `entry`=25305;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_garments_of_quests' WHERE `entry` IN (12429,12423,12427,12430,12428);
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
UPDATE creature_template SET ScriptName='npc_air_force_bots' WHERE entry IN (2614, 2615, 21974, 21993, 21996, 21997, 21999, 22001, 22002, 22003, 22063, 22065, 22066, 22068, 22069, 22070, 22071, 22078, 22079, 22080, 22086, 22087, 22088, 22090, 22124, 22125, 22126);
|
||||
@@ -0,0 +1,14 @@
|
||||
DELETE FROM `trinity_string` WHERE `entry` BETWEEN 5012 AND 5019;
|
||||
INSERT INTO `trinity_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) VALUES
|
||||
(5012, 'No maps found!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
|
||||
(5013, '[Continent]', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
|
||||
(5014, '[Instance]', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
|
||||
(5015, '[Battleground]', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
|
||||
(5016, '[Arena]', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
|
||||
(5017, '[Raid reset time: %u]', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
|
||||
(5018, '[Heroic reset time: %u]', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
|
||||
(5019, '[Mountable]', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
DELETE FROM `command` WHERE `name` = 'lookup map';
|
||||
INSERT INTO `command` (`name`, `security`, `help`) VALUES
|
||||
('lookup map', 3, 'Syntax: .lookup map $namepart\r\n\r\nLooks up a map by $namepart, and returns all matches with their map ID''s.');
|
||||
@@ -430,6 +430,7 @@ INSERT INTO `command` VALUES
|
||||
('lookup faction',3,'Syntax: .lookup faction $name\r\nAttempts to find the ID of the faction with the provided $name.'),
|
||||
('lookup item',3,'Syntax: .lookup item $itemname\r\n\r\nLooks up an item by $itemname, and returns all matches with their Item ID\'s.'),
|
||||
('lookup itemset',3,'Syntax: .lookup itemset $itemname\r\n\r\nLooks up an item set by $itemname, and returns all matches with their Item set ID\'s.'),
|
||||
('lookup map',3,'Syntax: .lookup map $namepart\r\n\r\nLooks up a map by $namepart, and returns all matches with their map ID''s.'),
|
||||
('lookup object',3,'Syntax: .lookup object $objname\r\n\r\nLooks up an gameobject by $objname, and returns all matches with their Gameobject ID\'s.'),
|
||||
('lookup player account',2,'Syntax: .lookup player account $account ($limit) \r\n\r\n Searchs players, which account username is $account with optional parametr $limit of results.'),
|
||||
('lookup player email',2,'Syntax: .lookup player email $email ($limit) \r\n\r\n Searchs players, which account email is $email with optional parametr $limit of results.'),
|
||||
@@ -15404,6 +15405,14 @@ INSERT INTO `trinity_string` VALUES
|
||||
(5009,'Sound %u Played to server',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(5010,'linkGUID: %u, Entry: %u (%s)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(5011,'You can\'t teleport self to self!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(5012,'No maps found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(5013,'[Continent]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(5014,'[Instance]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(5015,'[Battleground]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(5016,'[Arena]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(5017,'[Raid reset time: %u]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(5018,'[Heroic reset time: %u]',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(5019,'[Mountable]',NULL NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(6613,'|cfff00000[GM Announcement]: %s|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(6614,'Notification to GM\'s - ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(6615,'|cffffff00[|c1f40af20GM Announce by|r |cffff0000%s|cffffff00]:|r %s|r',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
|
||||
@@ -23,6 +23,7 @@ EndScriptData
|
||||
*/
|
||||
|
||||
/* ContentData
|
||||
npc_air_force_bots 80% support for misc (invisible) guard bots in areas where player allowed to fly. Summon guards after a preset time if tagged by spell
|
||||
npc_chicken_cluck 100% support for quest 3861 (Cluck!)
|
||||
npc_dancing_flames 100% midsummer event NPC
|
||||
npc_guardian 100% guardianAI used to prevent players from accessing off-limits areas. Not in use by SD2
|
||||
@@ -38,6 +39,213 @@ EndContentData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "../npc/npc_escortAI.h"
|
||||
#include "ObjectMgr.h"
|
||||
|
||||
/*########
|
||||
# npc_air_force_bots
|
||||
#########*/
|
||||
|
||||
enum SpawnType
|
||||
{
|
||||
SPAWNTYPE_TRIPWIRE_ROOFTOP, // no warning, summon creature at smaller range
|
||||
SPAWNTYPE_ALARMBOT, // cast guards mark and summon npc - if player shows up with that buff duration < 5 seconds attack
|
||||
};
|
||||
|
||||
struct SpawnAssociation
|
||||
{
|
||||
uint32 m_uiThisCreatureEntry;
|
||||
uint32 m_uiSpawnedCreatureEntry;
|
||||
SpawnType m_SpawnType;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
SPELL_GUARDS_MARK = 38067,
|
||||
AURA_DURATION_TIME_LEFT = 5000
|
||||
};
|
||||
|
||||
const float RANGE_TRIPWIRE = 15.0f;
|
||||
const float RANGE_GUARDS_MARK = 50.0f;
|
||||
|
||||
SpawnAssociation m_aSpawnAssociations[] =
|
||||
{
|
||||
{2614, 15241, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Alliance)
|
||||
{2615, 15242, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Horde)
|
||||
{21974, 21976, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Area 52)
|
||||
{21993, 15242, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Horde - Bat Rider)
|
||||
{21996, 15241, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Alliance - Gryphon)
|
||||
{21997, 21976, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Goblin - Area 52 - Zeppelin)
|
||||
{21999, 15241, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Alliance)
|
||||
{22001, 15242, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Horde)
|
||||
{22002, 15242, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Ground (Horde)
|
||||
{22003, 15241, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Ground (Alliance)
|
||||
{22063, 21976, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Goblin - Area 52)
|
||||
{22065, 22064, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Ethereal - Stormspire)
|
||||
{22066, 22067, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Scryer - Dragonhawk)
|
||||
{22068, 22064, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Ethereal - Stormspire)
|
||||
{22069, 22064, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Stormspire)
|
||||
{22070, 22067, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Scryer)
|
||||
{22071, 22067, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Scryer)
|
||||
{22078, 22077, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Aldor)
|
||||
{22079, 22077, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Aldor - Gryphon)
|
||||
{22080, 22077, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Aldor)
|
||||
{22086, 22085, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Sporeggar)
|
||||
{22087, 22085, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Sporeggar - Spore Bat)
|
||||
{22088, 22085, SPAWNTYPE_TRIPWIRE_ROOFTOP}, //Air Force Trip Wire - Rooftop (Sporeggar)
|
||||
{22090, 22089, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Toshley's Station - Flying Machine)
|
||||
{22124, 22122, SPAWNTYPE_ALARMBOT}, //Air Force Alarm Bot (Cenarion)
|
||||
{22125, 22122, SPAWNTYPE_ALARMBOT}, //Air Force Guard Post (Cenarion - Stormcrow)
|
||||
{22126, 22122, SPAWNTYPE_ALARMBOT} //Air Force Trip Wire - Rooftop (Cenarion Expedition)
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL npc_air_force_botsAI : public ScriptedAI
|
||||
{
|
||||
npc_air_force_botsAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
m_pSpawnAssoc = NULL;
|
||||
m_uiSpawnedGUID = 0;
|
||||
|
||||
// find the correct spawnhandling
|
||||
static uint32 uiEntryCount = sizeof(m_aSpawnAssociations)/sizeof(SpawnAssociation);
|
||||
|
||||
for (uint8 i=0; i<uiEntryCount; ++i)
|
||||
{
|
||||
if (m_aSpawnAssociations[i].m_uiThisCreatureEntry == pCreature->GetEntry())
|
||||
{
|
||||
m_pSpawnAssoc = &m_aSpawnAssociations[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_pSpawnAssoc)
|
||||
error_db_log("TCSR: Creature template entry %u has ScriptName npc_air_force_bots, but it's not handled by that script", pCreature->GetEntry());
|
||||
else
|
||||
{
|
||||
CreatureInfo const* spawnedTemplate = GetCreatureTemplateStore(m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
|
||||
|
||||
if (!spawnedTemplate)
|
||||
{
|
||||
m_pSpawnAssoc = NULL;
|
||||
error_db_log("TCSR: Creature template entry %u does not exist in DB, which is required by npc_air_force_bots", m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SpawnAssociation* m_pSpawnAssoc;
|
||||
uint64 m_uiSpawnedGUID;
|
||||
|
||||
void Reset() { }
|
||||
|
||||
Creature* SummonGuard()
|
||||
{
|
||||
Creature* pSummoned = m_creature->SummonCreature(m_pSpawnAssoc->m_uiSpawnedCreatureEntry, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000);
|
||||
|
||||
if (pSummoned)
|
||||
m_uiSpawnedGUID = pSummoned->GetGUID();
|
||||
else
|
||||
{
|
||||
error_db_log("TCSR: npc_air_force_bots: wasn't able to spawn creature %u", m_pSpawnAssoc->m_uiSpawnedCreatureEntry);
|
||||
m_pSpawnAssoc = NULL;
|
||||
}
|
||||
|
||||
return pSummoned;
|
||||
}
|
||||
|
||||
Creature* GetSummonedGuard()
|
||||
{
|
||||
Creature* pCreature = (Creature*)Unit::GetUnit(*m_creature, m_uiSpawnedGUID);
|
||||
|
||||
if (pCreature && pCreature->isAlive())
|
||||
return pCreature;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* pWho)
|
||||
{
|
||||
if (!m_pSpawnAssoc)
|
||||
return;
|
||||
|
||||
if (pWho->isTargetableForAttack() && m_creature->IsHostileTo(pWho))
|
||||
{
|
||||
Player* pPlayerTarget = pWho->GetTypeId() == TYPEID_PLAYER ? (Player*)pWho : NULL;
|
||||
|
||||
// airforce guards only spawn for players
|
||||
if (!pPlayerTarget)
|
||||
return;
|
||||
|
||||
Creature* pLastSpawnedGuard = m_uiSpawnedGUID == 0 ? NULL : GetSummonedGuard();
|
||||
|
||||
// prevent calling Unit::GetUnit at next MoveInLineOfSight call - speedup
|
||||
if (!pLastSpawnedGuard)
|
||||
m_uiSpawnedGUID = 0;
|
||||
|
||||
switch(m_pSpawnAssoc->m_SpawnType)
|
||||
{
|
||||
case SPAWNTYPE_ALARMBOT:
|
||||
{
|
||||
if (!pWho->IsWithinDistInMap(m_creature, RANGE_GUARDS_MARK))
|
||||
return;
|
||||
|
||||
Aura* pMarkAura = pWho->GetAura(SPELL_GUARDS_MARK, 0);
|
||||
if (pMarkAura)
|
||||
{
|
||||
// the target wasn't able to move out of our range within 25 seconds
|
||||
if (!pLastSpawnedGuard)
|
||||
{
|
||||
pLastSpawnedGuard = SummonGuard();
|
||||
|
||||
if (!pLastSpawnedGuard)
|
||||
return;
|
||||
}
|
||||
|
||||
if (pMarkAura->GetAuraDuration() < AURA_DURATION_TIME_LEFT)
|
||||
{
|
||||
if (!pLastSpawnedGuard->getVictim())
|
||||
pLastSpawnedGuard->AI()->AttackStart(pWho);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!pLastSpawnedGuard)
|
||||
pLastSpawnedGuard = SummonGuard();
|
||||
|
||||
if (!pLastSpawnedGuard)
|
||||
return;
|
||||
|
||||
pLastSpawnedGuard->CastSpell(pWho, SPELL_GUARDS_MARK, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPAWNTYPE_TRIPWIRE_ROOFTOP:
|
||||
{
|
||||
if (!pWho->IsWithinDistInMap(m_creature, RANGE_TRIPWIRE))
|
||||
return;
|
||||
|
||||
if (!pLastSpawnedGuard)
|
||||
pLastSpawnedGuard = SummonGuard();
|
||||
|
||||
if (!pLastSpawnedGuard)
|
||||
return;
|
||||
|
||||
// ROOFTOP only triggers if the player is on the ground
|
||||
if (!pPlayerTarget->IsFlying())
|
||||
{
|
||||
if (!pLastSpawnedGuard->getVictim())
|
||||
pLastSpawnedGuard->AI()->AttackStart(pWho);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_air_force_bots(Creature* pCreature)
|
||||
{
|
||||
return new npc_air_force_botsAI(pCreature);
|
||||
}
|
||||
|
||||
/*########
|
||||
# npc_chicken_cluck
|
||||
@@ -1373,6 +1581,11 @@ void AddSC_npcs_special()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_air_force_bots";
|
||||
newscript->GetAI = &GetAI_npc_air_force_bots;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_chicken_cluck";
|
||||
newscript->GetAI = &GetAI_npc_chicken_cluck;
|
||||
|
||||
@@ -36,8 +36,16 @@ EndContentData */
|
||||
## npc_bunthen_plainswind
|
||||
######*/
|
||||
|
||||
#define GOSSIP_BP1 "Do you know where I can find Half Pendant of Aquatic Endurance?"
|
||||
#define GOSSIP_BP2 "I'd like to fly to Thunder Bluff."
|
||||
enum
|
||||
{
|
||||
QUEST_SEA_LION_HORDE = 30,
|
||||
QUEST_SEA_LION_ALLY = 272,
|
||||
TAXI_PATH_ID_ALLY = 315,
|
||||
TAXI_PATH_ID_HORDE = 316
|
||||
};
|
||||
|
||||
#define GOSSIP_ITEM_THUNDER "I'd like to fly to Thunder Bluff."
|
||||
#define GOSSIP_ITEM_AQ_END "Do you know where I can find Half Pendant of Aquatic Endurance?"
|
||||
|
||||
bool GossipHello_npc_bunthen_plainswind(Player *player, Creature *_Creature)
|
||||
{
|
||||
@@ -45,17 +53,17 @@ bool GossipHello_npc_bunthen_plainswind(Player *player, Creature *_Creature)
|
||||
player->SEND_GOSSIP_MENU(4916,_Creature->GetGUID());
|
||||
else if(player->GetTeam() != HORDE)
|
||||
{
|
||||
if(player->GetQuestStatus(272) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM( 0, GOSSIP_BP1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
if(player->GetQuestStatus(QUEST_SEA_LION_ALLY) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM( 0, GOSSIP_ITEM_AQ_END, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
|
||||
player->SEND_GOSSIP_MENU(4917,_Creature->GetGUID());
|
||||
}
|
||||
else if(player->getClass() == CLASS_DRUID && player->GetTeam() == HORDE)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM( 0, GOSSIP_BP2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->ADD_GOSSIP_ITEM( 0, GOSSIP_ITEM_THUNDER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
|
||||
if(player->GetQuestStatus(30) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM( 0, GOSSIP_BP1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
if(player->GetQuestStatus(QUEST_SEA_LION_HORDE) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM( 0, GOSSIP_ITEM_AQ_END, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
|
||||
player->SEND_GOSSIP_MENU(4918,_Creature->GetGUID());
|
||||
}
|
||||
@@ -67,14 +75,10 @@ bool GossipSelect_npc_bunthen_plainswind(Player *player, Creature *_Creature, ui
|
||||
switch(action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
if (player->getClass() == CLASS_DRUID && player->GetTeam() == HORDE)
|
||||
{
|
||||
player->ActivateTaxiPathTo(316);
|
||||
}
|
||||
player->ActivateTaxiPathTo(TAXI_PATH_ID_HORDE);
|
||||
break;
|
||||
}
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
player->SEND_GOSSIP_MENU(5373,_Creature->GetGUID());
|
||||
break;
|
||||
@@ -139,25 +143,26 @@ bool GossipSelect_npc_great_bear_spirit(Player *player, Creature *_Creature, uin
|
||||
## npc_silva_filnaveth
|
||||
######*/
|
||||
|
||||
#define GOSSIP_SF1 "Do you know where I can find Half Pendant of Aquatic Agility?"
|
||||
#define GOSSIP_SF2 "I'd like to fly to Rut'theran Village."
|
||||
#define GOSSIP_ITEM_RUTHERAN "I'd like to fly to Rut'theran Village."
|
||||
#define GOSSIP_ITEM_AQ_AGI "Do you know where I can find Half Pendant of Aquatic Agility?"
|
||||
|
||||
bool GossipHello_npc_silva_filnaveth(Player *player, Creature *_Creature)
|
||||
{
|
||||
if(player->getClass() != CLASS_DRUID)
|
||||
player->SEND_GOSSIP_MENU(4913,_Creature->GetGUID());
|
||||
else if(player->GetTeam() != ALLIANCE)
|
||||
{
|
||||
if(player->GetQuestStatus(30) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM( 0, GOSSIP_SF1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
if(player->GetQuestStatus(QUEST_SEA_LION_HORDE) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM( 0, GOSSIP_ITEM_AQ_AGI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
|
||||
|
||||
player->SEND_GOSSIP_MENU(4915,_Creature->GetGUID());
|
||||
}
|
||||
else if(player->getClass() == CLASS_DRUID && player->GetTeam() == ALLIANCE)
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM( 0, GOSSIP_SF2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
player->ADD_GOSSIP_ITEM( 0, GOSSIP_ITEM_RUTHERAN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
|
||||
if(player->GetQuestStatus(272) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM( 0, GOSSIP_SF1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
if(player->GetQuestStatus(QUEST_SEA_LION_ALLY) == QUEST_STATUS_INCOMPLETE)
|
||||
player->ADD_GOSSIP_ITEM( 0, GOSSIP_ITEM_AQ_AGI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
|
||||
|
||||
player->SEND_GOSSIP_MENU(4914,_Creature->GetGUID());
|
||||
}
|
||||
@@ -169,12 +174,10 @@ bool GossipSelect_npc_silva_filnaveth(Player *player, Creature *_Creature, uint3
|
||||
switch(action)
|
||||
{
|
||||
case GOSSIP_ACTION_INFO_DEF + 1:
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
if (player->getClass() == CLASS_DRUID && player->GetTeam() == ALLIANCE)
|
||||
player->ActivateTaxiPathTo(315);
|
||||
player->ActivateTaxiPathTo(TAXI_PATH_ID_ALLY);
|
||||
break;
|
||||
}
|
||||
case GOSSIP_ACTION_INFO_DEF + 2:
|
||||
player->SEND_GOSSIP_MENU(5374,_Creature->GetGUID());
|
||||
break;
|
||||
|
||||
@@ -628,21 +628,13 @@ enum
|
||||
{
|
||||
QUEST_ALLY_OF_NETHER = 10870,
|
||||
|
||||
TAXI_NODE_START = 161, // From Karynaku
|
||||
TAXI_NODE_END = 162 // To Mordenai
|
||||
TAXI_PATH_ID = 649
|
||||
};
|
||||
|
||||
bool QuestAccept_npc_karynaku(Player* player, Creature* creature, Quest const* quest)
|
||||
{
|
||||
if(quest->GetQuestId() == QUEST_ALLY_OF_NETHER)
|
||||
{
|
||||
std::vector<uint32> nodes;
|
||||
|
||||
nodes.resize(2);
|
||||
nodes[0] = TAXI_NODE_START;
|
||||
nodes[1] = TAXI_NODE_END;
|
||||
player->ActivateTaxiPathTo(nodes); //player->ActivateTaxiPathTo(649);
|
||||
}
|
||||
player->ActivateTaxiPathTo(TAXI_PATH_ID); //player->ActivateTaxiPathTo(649);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -41,21 +41,28 @@ EndContentData */
|
||||
|
||||
#define GOSSIP_RALIQ "You owe Sim'salabim money. Hand them over or die!"
|
||||
|
||||
#define FACTION_HOSTILE_RD 45
|
||||
#define FACTION_FRIENDLY_RD 35
|
||||
|
||||
#define SPELL_UPPERCUT 10966
|
||||
enum
|
||||
{
|
||||
SPELL_UPPERCUT = 10966,
|
||||
QUEST_CRACK_SKULLS = 10009,
|
||||
FACTION_HOSTILE_RD = 45
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL npc_raliq_the_drunkAI : public ScriptedAI
|
||||
{
|
||||
npc_raliq_the_drunkAI(Creature* c) : ScriptedAI(c) {}
|
||||
npc_raliq_the_drunkAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
m_uiNormFaction = c->getFaction();
|
||||
}
|
||||
|
||||
uint32 m_uiNormFaction;
|
||||
uint32 Uppercut_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
Uppercut_Timer = 5000;
|
||||
m_creature->setFaction(FACTION_FRIENDLY_RD);
|
||||
if (m_creature->getFaction() != m_uiNormFaction)
|
||||
m_creature->setFaction(m_uiNormFaction);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who) {}
|
||||
@@ -74,6 +81,7 @@ struct TRINITY_DLL_DECL npc_raliq_the_drunkAI : public ScriptedAI
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_raliq_the_drunk(Creature *_Creature)
|
||||
{
|
||||
return new npc_raliq_the_drunkAI (_Creature);
|
||||
@@ -81,7 +89,7 @@ CreatureAI* GetAI_npc_raliq_the_drunk(Creature *_Creature)
|
||||
|
||||
bool GossipHello_npc_raliq_the_drunk(Player *player, Creature *_Creature )
|
||||
{
|
||||
if( player->GetQuestStatus(10009) == QUEST_STATUS_INCOMPLETE )
|
||||
if( player->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE )
|
||||
player->ADD_GOSSIP_ITEM(1, GOSSIP_RALIQ, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
player->SEND_GOSSIP_MENU(9440, _Creature->GetGUID());
|
||||
@@ -634,6 +642,7 @@ void AddSC_shattrath_city()
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_raliq_the_drunk";
|
||||
newscript->GetAI = &GetAI_npc_raliq_the_drunk;
|
||||
newscript->pGossipHello = &GossipHello_npc_raliq_the_drunk;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_raliq_the_drunk;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
@@ -243,19 +243,26 @@ CreatureAI* GetAI_mob_netherweb_victim(Creature *_Creature)
|
||||
#define GOSSIP_FLOON1 "You owe Sim'salabim money. Hand them over or die!"
|
||||
#define GOSSIP_FLOON2 "Hand over the money or die...again!"
|
||||
|
||||
#define SAY_FLOON_ATTACK -1000352
|
||||
enum
|
||||
{
|
||||
SAY_FLOON_ATTACK = -1000352,
|
||||
|
||||
#define FACTION_HOSTILE_FL 1738
|
||||
#define FACTION_FRIENDLY_FL 35
|
||||
SPELL_SILENCE = 6726,
|
||||
SPELL_FROSTBOLT = 9672,
|
||||
SPELL_FROST_NOVA = 11831,
|
||||
|
||||
#define SPELL_SILENCE 6726
|
||||
#define SPELL_FROSTBOLT 9672
|
||||
#define SPELL_FROST_NOVA 11831
|
||||
FACTION_HOSTILE_FL = 1738,
|
||||
QUEST_CRACK_SKULLS = 10009
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL npc_floonAI : public ScriptedAI
|
||||
{
|
||||
npc_floonAI(Creature* c) : ScriptedAI(c) {}
|
||||
npc_floonAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
m_uiNormFaction = c->getFaction();
|
||||
}
|
||||
|
||||
uint32 m_uiNormFaction;
|
||||
uint32 Silence_Timer;
|
||||
uint32 Frostbolt_Timer;
|
||||
uint32 FrostNova_Timer;
|
||||
@@ -265,7 +272,8 @@ struct TRINITY_DLL_DECL npc_floonAI : public ScriptedAI
|
||||
Silence_Timer = 2000;
|
||||
Frostbolt_Timer = 4000;
|
||||
FrostNova_Timer = 9000;
|
||||
m_creature->setFaction(FACTION_FRIENDLY_FL);
|
||||
if (m_creature->getFaction() != m_uiNormFaction)
|
||||
m_creature->setFaction(m_uiNormFaction);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who) {}
|
||||
@@ -296,6 +304,7 @@ struct TRINITY_DLL_DECL npc_floonAI : public ScriptedAI
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_floon(Creature *_Creature)
|
||||
{
|
||||
return new npc_floonAI (_Creature);
|
||||
@@ -303,8 +312,8 @@ CreatureAI* GetAI_npc_floon(Creature *_Creature)
|
||||
|
||||
bool GossipHello_npc_floon(Player *player, Creature *_Creature )
|
||||
{
|
||||
if( player->GetQuestStatus(10009) == QUEST_STATUS_INCOMPLETE )
|
||||
player->ADD_GOSSIP_ITEM(1, GOSSIP_FLOON1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
if( player->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE )
|
||||
player->ADD_GOSSIP_ITEM(0, GOSSIP_FLOON1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
|
||||
player->SEND_GOSSIP_MENU(9442, _Creature->GetGUID());
|
||||
return true;
|
||||
@@ -314,7 +323,7 @@ bool GossipSelect_npc_floon(Player *player, Creature *_Creature, uint32 sender,
|
||||
{
|
||||
if( action == GOSSIP_ACTION_INFO_DEF )
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(1, GOSSIP_FLOON2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->ADD_GOSSIP_ITEM(0, GOSSIP_FLOON2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->SEND_GOSSIP_MENU(9443, _Creature->GetGUID());
|
||||
}
|
||||
if( action == GOSSIP_ACTION_INFO_DEF+1 )
|
||||
@@ -538,9 +547,9 @@ void AddSC_terokkar_forest()
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_floon";
|
||||
newscript->GetAI = &GetAI_npc_floon;
|
||||
newscript->pGossipHello = &GossipHello_npc_floon;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_floon;
|
||||
newscript->GetAI = &GetAI_npc_floon;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
|
||||
@@ -120,21 +120,28 @@ bool GossipSelect_npcs_ashyen_and_keleth(Player *player, Creature *_Creature, ui
|
||||
|
||||
#define GOSSIP_COOSH "You owe Sim'salabim money. Hand them over or die!"
|
||||
|
||||
#define FACTION_HOSTILE_CO 45
|
||||
#define FACTION_FRIENDLY_CO 35
|
||||
|
||||
#define SPELL_LIGHTNING_BOLT 9532
|
||||
enum
|
||||
{
|
||||
SPELL_LIGHTNING_BOLT = 9532,
|
||||
QUEST_CRACK_SKULLS = 10009,
|
||||
FACTION_HOSTILE_CO = 45
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL npc_cooshcooshAI : public ScriptedAI
|
||||
{
|
||||
npc_cooshcooshAI(Creature* c) : ScriptedAI(c) {}
|
||||
npc_cooshcooshAI(Creature* c) : ScriptedAI(c)
|
||||
{
|
||||
m_uiNormFaction = c->getFaction();
|
||||
}
|
||||
|
||||
uint32 m_uiNormFaction;
|
||||
uint32 LightningBolt_Timer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
LightningBolt_Timer = 2000;
|
||||
m_creature->setFaction(FACTION_FRIENDLY_CO);
|
||||
if (m_creature->getFaction() != m_uiNormFaction)
|
||||
m_creature->setFaction(m_uiNormFaction);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit *who) {}
|
||||
@@ -153,6 +160,7 @@ struct TRINITY_DLL_DECL npc_cooshcooshAI : public ScriptedAI
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_cooshcoosh(Creature *_Creature)
|
||||
{
|
||||
return new npc_cooshcooshAI (_Creature);
|
||||
@@ -160,8 +168,8 @@ CreatureAI* GetAI_npc_cooshcoosh(Creature *_Creature)
|
||||
|
||||
bool GossipHello_npc_cooshcoosh(Player *player, Creature *_Creature )
|
||||
{
|
||||
if( player->GetQuestStatus(10009) == QUEST_STATUS_INCOMPLETE )
|
||||
player->ADD_GOSSIP_ITEM(1, GOSSIP_COOSH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
if( player->GetQuestStatus(QUEST_CRACK_SKULLS) == QUEST_STATUS_INCOMPLETE )
|
||||
player->ADD_GOSSIP_ITEM(0, GOSSIP_COOSH, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
|
||||
player->SEND_GOSSIP_MENU(9441, _Creature->GetGUID());
|
||||
return true;
|
||||
@@ -359,6 +367,7 @@ void AddSC_zangarmarsh()
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_cooshcoosh";
|
||||
newscript->GetAI = &GetAI_npc_cooshcoosh;
|
||||
newscript->pGossipHello = &GossipHello_npc_cooshcoosh;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_cooshcoosh;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
@@ -104,7 +104,7 @@ bool GossipHello_npc_sergeant_bly(Player *player, Creature *_Creature )
|
||||
{
|
||||
/*if( pInstance->GetData(0) == DONE )
|
||||
{*/
|
||||
player->ADD_GOSSIP_ITEM(1, GOSSIP_BLY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->ADD_GOSSIP_ITEM(0, GOSSIP_BLY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->SEND_GOSSIP_MENU(1517, _Creature->GetGUID());
|
||||
/*}
|
||||
else if( pInstance->GetData(0) == IN_PROGRESS )
|
||||
@@ -182,7 +182,7 @@ bool GossipHello_npc_weegli_blastfuse(Player *player, Creature *_Creature )
|
||||
//event not implemented yet, this is only placeholder for future developement
|
||||
/*if( pInstance->GetData(0) == DONE )
|
||||
{
|
||||
player->ADD_GOSSIP_ITEM(1, GOSSIP_WEEGLI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->ADD_GOSSIP_ITEM(0, GOSSIP_WEEGLI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
player->SEND_GOSSIP_MENU(1514, _Creature->GetGUID());//if event can proceed to end
|
||||
}
|
||||
else if( pInstance->GetData(0) == IN_PROGRESS )
|
||||
|
||||
@@ -306,6 +306,7 @@ ChatCommand * ChatHandler::getCommandTable()
|
||||
{ "spell", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupSpellCommand, "", NULL },
|
||||
{ "taxinode", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupTaxiNodeCommand, "", NULL },
|
||||
{ "tele", SEC_MODERATOR, true, &ChatHandler::HandleLookupTeleCommand, "", NULL },
|
||||
{ "map", SEC_ADMINISTRATOR, true, &ChatHandler::HandleLookupMapCommand, "", NULL },
|
||||
{ NULL, 0, false, NULL, "", NULL }
|
||||
};
|
||||
|
||||
|
||||
@@ -256,6 +256,7 @@ class ChatHandler
|
||||
bool HandleLookupSpellCommand(const char* args);
|
||||
bool HandleLookupTaxiNodeCommand(const char * args);
|
||||
bool HandleLookupTeleCommand(const char * args);
|
||||
bool HandleLookupMapCommand(const char* args);
|
||||
|
||||
bool HandleModifyKnownTitlesCommand(const char* args);
|
||||
bool HandleModifyHPCommand(const char* args);
|
||||
|
||||
+11
-2
@@ -854,7 +854,16 @@ enum TrinityStrings
|
||||
LANG_COMMAND_PLAYED_TO_ALL = 5009,
|
||||
LANG_NPCINFO_LINKGUID = 5010,
|
||||
LANG_TELEPORTED_TO_BY_CONSOLE = 5011,
|
||||
// Room for more Trinity strings 5012-9999
|
||||
// for command lookup map
|
||||
LANG_COMMAND_NOMAPFOUND = 5012,
|
||||
LANG_CONTINENT = 5013,
|
||||
LANG_INSTANCE = 5014,
|
||||
LANG_BATTLEGROUND = 5015,
|
||||
LANG_ARENA = 5016,
|
||||
LANG_RAID = 5017,
|
||||
LANG_HEROIC = 5018,
|
||||
LANG_MOUNTABLE = 5019,
|
||||
// Room for more Trinity strings 5020-9999
|
||||
// Used for GM Announcements
|
||||
LANG_GM_BROADCAST = 6613,
|
||||
LANG_GM_NOTIFY = 6614,
|
||||
@@ -929,7 +938,7 @@ enum TrinityStrings
|
||||
LANG_OPVP_EP_FLIGHT_CGT = 10053,
|
||||
LANG_OPVP_ZM_GOSSIP_ALLIANCE = 10054,
|
||||
LANG_OPVP_ZM_GOSSIP_HORDE = 10055,
|
||||
|
||||
|
||||
// Use for custom patches 11000-11999
|
||||
|
||||
// NOT RESERVED IDS 12000-1999999999
|
||||
|
||||
@@ -3799,6 +3799,103 @@ bool ChatHandler::HandleLookupTaxiNodeCommand(const char * args)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ChatHandler::HandleLookupMapCommand(const char* args)
|
||||
{
|
||||
if(!*args)
|
||||
return false;
|
||||
|
||||
std::string namepart = args;
|
||||
std::wstring wnamepart;
|
||||
|
||||
// converting string that we try to find to lower case
|
||||
if(!Utf8toWStr(namepart, wnamepart))
|
||||
return false;
|
||||
|
||||
wstrToLower(wnamepart);
|
||||
|
||||
uint32 counter = 0;
|
||||
|
||||
// search in Map.dbc
|
||||
for(uint32 id = 0; id < sMapStore.GetNumRows(); id++)
|
||||
{
|
||||
MapEntry const* MapInfo = sMapStore.LookupEntry(id);
|
||||
if(MapInfo)
|
||||
{
|
||||
uint8 loc = m_session ? m_session->GetSessionDbcLocale() : sWorld.GetDefaultDbcLocale();
|
||||
|
||||
std::string name = MapInfo->name[loc];
|
||||
if(name.empty())
|
||||
continue;
|
||||
|
||||
if(!Utf8FitTo(name, wnamepart))
|
||||
{
|
||||
loc = LOCALE_enUS;
|
||||
for(; loc < MAX_LOCALE; loc++)
|
||||
{
|
||||
if(m_session && loc == m_session->GetSessionDbcLocale())
|
||||
continue;
|
||||
|
||||
name = MapInfo->name[loc];
|
||||
if(name.empty())
|
||||
continue;
|
||||
|
||||
if(Utf8FitTo(name, wnamepart))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(loc < MAX_LOCALE)
|
||||
{
|
||||
// send map in "id - [name][Continent][Instance/Battleground/Arena][Raid reset time:][Heroic reset time:][Mountable]" format
|
||||
std::ostringstream ss;
|
||||
|
||||
if(m_session)
|
||||
ss << id << " - |cffffffff|Hmap:" << id << "|h[" << name << "]";
|
||||
else // console
|
||||
ss << id << " - [" << name << "]";
|
||||
|
||||
if(MapInfo->IsContinent())
|
||||
ss << GetTrinityString(LANG_CONTINENT);
|
||||
|
||||
switch(MapInfo->map_type)
|
||||
{
|
||||
case MAP_INSTANCE: ss << GetTrinityString(LANG_INSTANCE); break;
|
||||
case MAP_BATTLEGROUND: ss << GetTrinityString(LANG_BATTLEGROUND); break;
|
||||
case MAP_ARENA: ss << GetTrinityString(LANG_ARENA); break;
|
||||
}
|
||||
|
||||
if(MapInfo->IsRaid())
|
||||
ss << GetTrinityString(LANG_RAID);
|
||||
|
||||
if(MapInfo->SupportsHeroicMode())
|
||||
ss << GetTrinityString(LANG_HEROIC);
|
||||
|
||||
uint32 ResetTimeRaid = MapInfo->resetTimeRaid;
|
||||
uint32 ResetTimeHeroic = MapInfo->resetTimeHeroic;
|
||||
|
||||
if(MapInfo->IsMountAllowed())
|
||||
ss << GetTrinityString(LANG_MOUNTABLE);
|
||||
|
||||
if(ResetTimeRaid && !ResetTimeHeroic)
|
||||
PSendSysMessage(ss.str().c_str(), ResetTimeRaid);
|
||||
else if(!ResetTimeRaid && ResetTimeHeroic)
|
||||
PSendSysMessage(ss.str().c_str(), ResetTimeHeroic);
|
||||
else if(ResetTimeRaid && ResetTimeHeroic)
|
||||
PSendSysMessage(ss.str().c_str(), ResetTimeRaid, ResetTimeHeroic);
|
||||
else
|
||||
SendSysMessage(ss.str().c_str());
|
||||
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!counter)
|
||||
SendSysMessage(LANG_COMMAND_NOMAPFOUND);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/** \brief GM command level 3 - Create a guild.
|
||||
*
|
||||
* This command allows a GM (level 3) to create a guild.
|
||||
|
||||
+35
-11
@@ -28,6 +28,14 @@
|
||||
void WorldSession::HandleGMTicketCreateOpcode( WorldPacket & recv_data )
|
||||
{
|
||||
CHECK_PACKET_SIZE(recv_data, 4*4+1+2*4);
|
||||
|
||||
if(GM_Ticket *ticket = objmgr.GetGMTicketByPlayer(GetPlayer()->GetGUID()))
|
||||
{
|
||||
WorldPacket data( SMSG_GMTICKET_CREATE, 4 );
|
||||
data << uint32(1); // 1 - You already have GM ticket
|
||||
SendPacket( &data );
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 map;
|
||||
float x, y, z;
|
||||
@@ -105,24 +113,22 @@ void WorldSession::HandleGMTicketDeleteOpcode( WorldPacket & /*recv_data*/)
|
||||
|
||||
sWorld.SendGMText(LANG_COMMAND_TICKETPLAYERABANDON, GetPlayer()->GetName(), ticket->guid );
|
||||
objmgr.RemoveGMTicket(ticket, GetPlayer()->GetGUID(), false);
|
||||
SendGMTicketGetTicket(0x0A, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleGMTicketGetTicketOpcode( WorldPacket & /*recv_data*/)
|
||||
{
|
||||
WorldPacket data(SMSG_GMTICKET_GETTICKET, 400);
|
||||
WorldPacket data( SMSG_QUERY_TIME_RESPONSE, 4+4 );
|
||||
data << (uint32)time(NULL);
|
||||
data << (uint32)0;
|
||||
SendPacket( &data );
|
||||
|
||||
GM_Ticket *ticket = objmgr.GetGMTicketByPlayer(GetPlayer()->GetGUID());
|
||||
|
||||
if(!ticket)
|
||||
{
|
||||
data << uint32(10);
|
||||
SendPacket(&data);
|
||||
return;
|
||||
}
|
||||
data << uint32(6);
|
||||
data << ticket->message.c_str();
|
||||
SendPacket(&data);
|
||||
if(ticket)
|
||||
SendGMTicketGetTicket(0x06, ticket->message.c_str());
|
||||
else
|
||||
SendGMTicketGetTicket(0x0A, 0);
|
||||
|
||||
}
|
||||
|
||||
@@ -132,3 +138,21 @@ void WorldSession::HandleGMTicketSystemStatusOpcode( WorldPacket & /*recv_data*/
|
||||
data << uint32(1);
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::SendGMTicketGetTicket(uint32 status, char const* text)
|
||||
{
|
||||
int len = text ? strlen(text) : 0;
|
||||
WorldPacket data( SMSG_GMTICKET_GETTICKET, (4+len+1+4+2+4+4) );
|
||||
data << uint32(status); // standard 0x0A, 0x06 if text present
|
||||
if(status == 6)
|
||||
{
|
||||
data << text; // ticket text
|
||||
data << uint8(0x7); // ticket category
|
||||
data << float(0); // tickets in queue?
|
||||
data << float(0); // if > "tickets in queue" then "We are currently experiencing a high volume of petitions."
|
||||
data << float(0); // 0 - "Your ticket will be serviced soon", 1 - "Wait time currently unavailable"
|
||||
data << uint8(0); // if == 2 and next field == 1 then "Your ticket has been escalated"
|
||||
data << uint8(0); // const
|
||||
}
|
||||
SendPacket( &data );
|
||||
}
|
||||
|
||||
@@ -171,7 +171,6 @@ class TRINITY_DLL_SPEC WorldSession
|
||||
void SendTabardVendorActivate( uint64 guid );
|
||||
void SendSpiritResurrect();
|
||||
void SendBindPoint(Creature* npc);
|
||||
void SendGMTicketGetTicket(uint32 status, char const* text);
|
||||
|
||||
void SendAttackStop(Unit const* enemy);
|
||||
|
||||
@@ -329,6 +328,7 @@ class TRINITY_DLL_SPEC WorldSession
|
||||
void HandleGMTicketDeleteOpcode(WorldPacket& recvPacket);
|
||||
void HandleGMTicketGetTicketOpcode(WorldPacket& recvPacket);
|
||||
void HandleGMTicketSystemStatusOpcode(WorldPacket& recvPacket);
|
||||
void SendGMTicketGetTicket(uint32 status, char const* text);
|
||||
|
||||
//void HandleGMSurveySubmit(WorldPacket& recvPacket);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user