aboutsummaryrefslogtreecommitdiff
path: root/src/game/InstanceData.cpp
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-16 16:45:01 -0700
committermaximius <none@none>2009-10-16 16:45:01 -0700
commit3552bba00c5849bb55abba9380e98c68e4806685 (patch)
tree2b05d8f4003bf773c9c2d4a00f613b01ee6a369e /src/game/InstanceData.cpp
parent8f112506f6467246a3e1cbb4f1d2163c38c067fc (diff)
*Implement some new functions by WarHead (not really sure if they're needed, could probably be done another way)
--HG-- branch : trunk
Diffstat (limited to 'src/game/InstanceData.cpp')
-rw-r--r--src/game/InstanceData.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/game/InstanceData.cpp b/src/game/InstanceData.cpp
index 567c06ac5ec..1398038d724 100644
--- a/src/game/InstanceData.cpp
+++ b/src/game/InstanceData.cpp
@@ -296,3 +296,39 @@ void InstanceData::DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData)
else
debug_log("TSCR: DoUpdateWorldState attempt send data but no players in map.");
}
+
+/* Not used anywhere yet, not sure if they're needed:
+// Send Notify to all players in instance
+void InstanceData::DoSendNotifyToInstance(const char *format, ...)
+{
+ InstanceMap::PlayerList const &PlayerList = instance->GetPlayers();
+ InstanceMap::PlayerList::const_iterator i;
+
+ if (!PlayerList.isEmpty())
+ for (i = PlayerList.begin(); i != PlayerList.end(); ++i)
+ if ((*i).getSource() && (*i).getSource()->GetSession())
+ (*i).getSource()->GetSession()->SendNotification(format);
+}
+
+// Complete Achievement for all players in instance
+void InstanceData::DoCompleteAchievement(uint32 achievement)
+{
+ AchievementEntry const* AE = GetAchievementStore()->LookupEntry(achievement);
+ Map::PlayerList const &PlayerList = instance->GetPlayers();
+
+ if (!PlayerList.isEmpty())
+ for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
+ if (i->getSource())
+ i->getSource()->CompletedAchievement(AE);
+}
+*/
+
+// Remove Auras due to Spell on all players in instance
+void InstanceData::DoRemoveAurasDueToSpellOnPlayers(uint32 spell)
+{
+ Map::PlayerList const &PlayerList = instance->GetPlayers();
+
+ if (!PlayerList.isEmpty())
+ for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
+ if (i->getSource() && i->getSource()->HasAura(spell)) i->getSource()->RemoveAurasDueToSpell(spell);
+}