Added an additional event and made it also standalone

CrazyDutchGuy [07-13-14 - 09:05]
Added an additional event and made it also standalone
Filename
LibGuildInfo.lua
LibGuildInfo.txt
README
README.md
diff --git a/LibGuildInfo.lua b/LibGuildInfo.lua
index d665400..ffe1c71 100644
--- a/LibGuildInfo.lua
+++ b/LibGuildInfo.lua
@@ -1,4 +1,4 @@
-local MAJOR, MINOR = "LibGuildInfo-1.0", 1
+local MAJOR, MINOR = "LibGuildInfo-1.0", 2
 local LibGuildInfo, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 if not LibGuildInfo then return end	--the same or newer version of this lib is already loaded into memory

@@ -27,7 +27,7 @@ function LibGuildInfo:GetLevelByMemberName(name)
 	local member = self:GetGuildMemberByMemberName(name)
 	if member then
 		if member.level < 50 then return member.level end
-		return "v" .. member.veteranRank
+		return "V" .. member.veteranRank
 	end
 end

@@ -161,9 +161,10 @@ function LibGuildInfo:OnGuildMemberCharacterUpdated(guildId, displayName)
 	GUILD_ROSTER:SetGuildId(currentGuildId)
 end

-EVENT_MANAGER:RegisterForEvent("LGI_EVENT_PLAYER_ACTIVATED", EVENT_PLAYER_ACTIVATED, function() LibGuildInfo:DataLoaded() end)
-EVENT_MANAGER:RegisterForEvent("LGI_EVENT_GUILD_MEMBER_ADDED", EVENT_GUILD_MEMBER_ADDED, function(_, guildId, displayName) LibGuildInfo:OnGuildMemberAdded(guildId, displayName) end)
-EVENT_MANAGER:RegisterForEvent("LGI_EVENT_GUILD_MEMBER_REMOVED", EVENT_GUILD_MEMBER_REMOVED, function(_, guildId, displayName) LibGuildInfo:OnGuildMemberRemoved(guildId, displayName) end)
-EVENT_MANAGER:RegisterForEvent("LGI_EVENT_GUILD_MEMBER_CHARACTER_UPDATED", EVENT_GUILD_MEMBER_CHARACTER_UPDATED,  function(_, guildId, displayName) LibGuildInfo:OnGuildMemberCharacterUpdated(guildId, displayName) end)
-EVENT_MANAGER:RegisterForEvent("LGI_EVENT_GUILD_MEMBER_CHARACTER_LEVEL_CHANGED", EVENT_GUILD_MEMBER_CHARACTER_LEVEL_CHANGED,	function(_, guildId, displayName) LibGuildInfo:OnGuildMemberCharacterUpdated(guildId, displayName) end)
-EVENT_MANAGER:RegisterForEvent("LGI_EVENT_GUILD_MEMBER_CHARACTER_VETERAN_RANK_CHANGED", EVENT_GUILD_MEMBER_CHARACTER_VETERAN_RANK_CHANGED, function(_, guildId, displayName) LibGuildInfo:OnGuildMemberCharacterUpdated(guildId, displayName) end)
\ No newline at end of file
+EVENT_MANAGER:RegisterForEvent(MAJOR, EVENT_PLAYER_ACTIVATED, function() LibGuildInfo:DataLoaded() end)
+EVENT_MANAGER:RegisterForEvent(MAJOR, EVENT_GUILD_MEMBER_ADDED, function(_, guildId, displayName) LibGuildInfo:OnGuildMemberAdded(guildId, displayName) end)
+EVENT_MANAGER:RegisterForEvent(MAJOR, EVENT_GUILD_MEMBER_REMOVED, function(_, guildId, displayName) LibGuildInfo:OnGuildMemberRemoved(guildId, displayName) end)
+EVENT_MANAGER:RegisterForEvent(MAJOR, EVENT_GUILD_MEMBER_CHARACTER_UPDATED,  function(_, guildId, displayName) LibGuildInfo:OnGuildMemberCharacterUpdated(guildId, displayName) end)
+EVENT_MANAGER:RegisterForEvent(MAJOR, EVENT_GUILD_MEMBER_CHARACTER_LEVEL_CHANGED,	function(_, guildId, displayName) LibGuildInfo:OnGuildMemberCharacterUpdated(guildId, displayName) end)
+EVENT_MANAGER:RegisterForEvent(MAJOR, EVENT_GUILD_MEMBER_CHARACTER_VETERAN_RANK_CHANGED, function(_, guildId, displayName) LibGuildInfo:OnGuildMemberCharacterUpdated(guildId, displayName) end)
+EVENT_MANAGER:RegisterForEvent(MAJOR, EVENT_GUILD_MEMBER_RANK_CHANGED, function(_, guildId, displayName) LibGuildInfo:OnGuildMemberCharacterUpdated(guildId, displayName) end)
diff --git a/LibGuildInfo.txt b/LibGuildInfo.txt
new file mode 100644
index 0000000..646b9d2
--- /dev/null
+++ b/LibGuildInfo.txt
@@ -0,0 +1,7 @@
+## Title: |cFFFFB0LibGuildInfo|r by |c00C000CrazyDutchGuy & Wobin|r
+## APIVersion: 100007
+## OptionalDependsOn: LibStub
+
+Libs/LibStub/LibStub.lua
+
+LibGuildInfo.lua
\ No newline at end of file
diff --git a/README b/README
new file mode 100644
index 0000000..37685a4
--- /dev/null
+++ b/README
@@ -0,0 +1 @@
+This Add-on is not created by, affiliated with or sponsored by ZeniMax Media Inc. or its affiliates. The Elder Scrolls® and related logos are registered trademarks or trademarks of ZeniMax Media Inc. in the United States and/or other countries. All rights reserved.
\ No newline at end of file
diff --git a/README.md b/README.md
deleted file mode 100644
index 2ba2892..0000000
--- a/README.md
+++ /dev/null
@@ -1,97 +0,0 @@
-#LibGuildInfo
-**Author** - Wobin
-**Date** - 25/05/2014
-**Game** - *Elder Scrolls Online*
-
-This library will retrieve and store guild member information for easy access via account name or character name
-
-##Setup
-
-1. Place the library in your addon folder
-2. Reference `LibStub` in your manifest
-3. Reference `LibGuildInfo` in your manifest
-4. Reference `LibGuildInfo` in your code:
-
-            local LibGuildInfo = LibStub("LibGuildInfo-1.0")
-
-##API
-The following API is defined:
-
-###GetGuildMemberByMemberName
-
-	LibGuildInfo:GetGuildMemberByMemberName(name)
-
-- *name* - being either the account name with the @ symbol or the character name
-
-**Returns**
-- *guildInfo* - an object that contains all guild info used in the guild panel
-
-###GetClassNumByMemberName
-
-	LibGuildInfo:GetClassNumByMemberName(name)
-
-- *name* - as above
-
-**Returns**
-- *classNum* - a number representing the class
-	- [1] = "Dragon Knight"
-	- [2] = "Sorcerer"
-	- [3] = "Nightblade"
-	- [6] = "Templar"
-
-###GetClassNameByMemberName
-
-	LibGuildInfo:GetClassNameByMemberName(name)
-
-- *name* - as above
-
-**Returns***
-- *className* - The english representation of the class
-
-###GetLevelByMemberName
-
-	GetLevelByMemberName(name)
-
-- *name* - as above
-
-**Returns***
-- *level* - Numerical representation of the player character's level. Veteren ranks represented by 'Vx'
-
-###GetAllianceNumByMemberName
-
-    GetAllianceNumByMemberName(name)
-
-- *name* as above
-
-**Returns**
-- *allianceNum* - Numerical representation of the alliance the currently logged in player is a member of
-    - [1] = "Aldmeri Dominion"
-    - [2] = "Ebonhart Pact"
-    - [3] = "Daggerfall Convenant"
-
-###GetAllianceNameByMemberName
-
-    GetAllianceNameByMemberName(name)
-
-- *name* as above
-
-**Returns**
-- *allianceName* - The english representation of the Alliance
-
-###GetGuildRankIndexByMemberName
-
-    GetGuildRankIndexByMemberName(name)
-
-- *name* as above
-
-**Returns**
-- *rankIndex* - Numerical representation of the account's guild rank (1 is Guild Leader)
-
-###GetGuildRankByMemberName
-
-    GetGuildRankByMemberName(name)
-
-- *name* as above
-
-**Returns**
-- *rank* - A more textual representation 'GL' for Guild leader and 'Rx' for subsequent membership