Core/Scripts: Add GroupScript class
--HG-- branch : trunk
This commit is contained in:
1 parent
8c74993a43
commit
80051c6d3c
3 files changed
+68
-1
No files matched your search
@@ -726,6 +726,21 @@ class GuildScript : public ScriptObject
|
||||
virtual void OnDisband(Guild* /*guild*/) { }
|
||||
};
|
||||
|
||||
class GroupScript : public ScriptObject
|
||||
{
|
||||
protected:
|
||||
GroupScript(const char* name);
|
||||
|
||||
public:
|
||||
bool IsDatabaseBound() const { return false; }
|
||||
|
||||
virtual void OnAddMember(Group* /*group*/, uint64 /*guid*/) { }
|
||||
virtual void OnInviteMember(Group* /*group*/, uint64 /*guid*/) { }
|
||||
virtual void OnRemoveMember(Group* /*group*/, uint64 /*guid*/, RemoveMethod& /*method*/) { }
|
||||
virtual void OnChangeLeader(Group* /*group*/, uint64 /*newLeaderGuid*/, uint64 /*oldLeaderGuid*/) { }
|
||||
virtual void OnDisband(Group* /*group*/) { }
|
||||
};
|
||||
|
||||
// Placed here due to ScriptRegistry::AddScript dependency.
|
||||
#define sScriptMgr (*ACE_Singleton<ScriptMgr, ACE_Null_Mutex>::instance())
|
||||
|
||||
@@ -924,6 +939,13 @@ class ScriptMgr
|
||||
void OnGuildInfoChanged(Guild *guild, std::string newGInfo);
|
||||
void OnGuildDisband(Guild *guild);
|
||||
|
||||
public: /* GroupScript */
|
||||
void OnGroupAddMember(Group* group, uint64 guid);
|
||||
void OnGroupInviteMember(Group* group, uint64 guid);
|
||||
void OnGroupRemoveMember(Group* group, uint64 guid, RemoveMethod method);
|
||||
void OnGroupChangeLeader(Group* group, uint64 newLeaderGuid, uint64 oldLeaderGuid);
|
||||
void OnGroupDisband(Group* group);
|
||||
|
||||
public: /* ScriptRegistry */
|
||||
|
||||
// This is the global static registry of scripts.
|
||||
|
||||
Reference in new issue
Block a user