Skip to content

Commit

Permalink
Merge pull request #22 from WoWHellgarve-HolyDeeW/master
Browse files Browse the repository at this point in the history
Core/Mod Update scripts to current core state
  • Loading branch information
M'Dic authored Sep 19, 2022
2 parents 56cdfeb + 7abc348 commit 85ef110
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/Npc_Services.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ class Npc_Services : public CreatureScript
bool OnGossipHello(Player *player, Creature *creature)
{
AddGossipItemFor(player, 10, "|TInterface\\icons\\Spell_Nature_Regenerate:40:40:-18|t Restore HP and MP", GOSSIP_SENDER_MAIN, 1); // Restore Health and Mana
//AddGossipItemFor(player, 10, "|TInterface\\icons\\Achievement_BG_winAB_underXminutes:40:40:-18|t Reset Instances", GOSSIP_SENDER_MAIN, 2); // Reset Instances
AddGossipItemFor(player, 10, "|TInterface\\icons\\Achievement_BG_winAB_underXminutes:40:40:-18|t Reset Instances", GOSSIP_SENDER_MAIN, 2); // Reset Instances
AddGossipItemFor(player, 10, "|TInterface\\icons\\SPELL_HOLY_BORROWEDTIME:40:40:-18|t Reset Cooldowns", GOSSIP_SENDER_MAIN, 3); // Reset Cooldowns
AddGossipItemFor(player, 10, "|TInterface\\icons\\Achievement_BG_AB_defendflags:40:40:-18|t Reset Combat", GOSSIP_SENDER_MAIN, 4); // Leave Combat
AddGossipItemFor(player, 10, "|TInterface\\icons\\Spell_Shadow_DeathScream:40:40:-18|t Remove Sickness", GOSSIP_SENDER_MAIN, 5); // Remove Sickness
AddGossipItemFor(player, 10, "|TInterface\\icons\\Spell_Shadow_DeathScream:40:40:-18|t Remove Sickness", GOSSIP_SENDER_MAIN, 5); // Remove Sickness
AddGossipItemFor(player, 10, "|TInterface\\icons\\INV_Hammer_24:40:40:-18|t Repair Items", GOSSIP_SENDER_MAIN, 6); // Repair Items
AddGossipItemFor(player, 10, "|TInterface\\icons\\Achievement_WorldEvent_Lunar:40:40:-18|t Reset Talents", GOSSIP_SENDER_MAIN, 7); // Reset Talents
AddGossipItemFor(player, 10, "|TInterface/Icons/INV_Misc_Bag_07:40:40:-18|t Bank", GOSSIP_SENDER_MAIN, 8); // Open Bank
AddGossipItemFor(player, 10, "|TInterface/Icons/INV_Letter_11:40:40:-18|t Mail", GOSSIP_SENDER_MAIN, 9); // Open Mailbox
AddGossipItemFor(player, 10, "|TInterface/Icons/achievement_general:40:40:-18|t Learn Dual Talents", GOSSIP_SENDER_MAIN, 10); // Learn Dualspec
AddGossipItemFor(player, 10, "|TInterface/Icons/achievement_general:40:40:-18|t Learn Dual Talents", GOSSIP_SENDER_MAIN, 10); // Learn Dualspec

SendGossipMenuFor(player, 1, creature->GetGUID());
return true;
Expand All @@ -52,19 +52,16 @@ class Npc_Services : public CreatureScript
player->CastSpell(player, 31726);
break;

/*case 2: // Reset Instances
case 2: // Reset Instances
CloseGossipMenuFor(player);
for (uint8 i = 0; i < MAX_DIFFICULTY; ++i)
{
BoundInstancesMap const& m_boundInstances = sInstanceSaveMgr->PlayerGetBoundInstances(player->GetGUIDLow(), Difficulty(i));
BoundInstancesMap const& m_boundInstances = sInstanceSaveMgr->PlayerGetBoundInstances(player->GetGUID(), Difficulty(i));
for (BoundInstancesMap::const_iterator itr = m_boundInstances.begin(); itr != m_boundInstances.end();)
{
InstanceSave* save = itr->second.save;
if (itr->first != player->GetMapId())
{
uint32 resetTime = itr->second.extended ? save->GetExtendedResetTime() : save->GetResetTime();
uint32 ttr = (resetTime >= time(nullptr) ? resetTime - time(nullptr) : 0);
sInstanceSaveMgr->PlayerUnbindInstance(player->GetGUIDLow(), itr->first, Difficulty(i), true, player);
sInstanceSaveMgr->PlayerUnbindInstance(player->GetGUID(), itr->first, Difficulty(i), true, player);
itr = m_boundInstances.begin();
}
else
Expand All @@ -75,7 +72,7 @@ class Npc_Services : public CreatureScript
player->GetSession()->SendNotification("|cffFFFF00NPC SERVICES \n |cffFFFFFFInstances succesfully reseted!");
player->CastSpell(player, 59908);
return true;
break;*/
break;

case 3: // Reset Cooldowns
CloseGossipMenuFor(player);
Expand Down Expand Up @@ -156,5 +153,5 @@ class Npc_Services : public CreatureScript

void AddSC_Npc_Services()
{
new Npc_Services();
new Npc_Services();
}

0 comments on commit 85ef110

Please sign in to comment.