Quantcast

Refreshes volatile cache data (xp, quality, etc) on follower events

Alar of Daggerspine [10-12-15 - 18:39]
Refreshes volatile cache data (xp, quality, etc) on follower events

Signed-off-by: Alar of Daggerspine <alar@aspide.it>
Filename
FollowerCache.lua
diff --git a/FollowerCache.lua b/FollowerCache.lua
index 6e76778..9a2ff05 100644
--- a/FollowerCache.lua
+++ b/FollowerCache.lua
@@ -63,6 +63,10 @@ print(event,...)
 	if event=="GARRISON_FOLLOWER_UPGRADED" or event=="GARRISON_FOLLOWER_XP_CHANGED" then
 		local followerID=...
 		if (self.cache[followerID]) then
+			self.cache[followerID]['level']=G.GetFollowerLevel(followerID)
+			self.cache[followerID]['xp']=G.GetFollowerXP(followerID)
+			self.cache[followerID]['levelXP']=G.GetFollowerLevelXP(followerID)
+			self.cache[followerID]['quality']=G.GetFollowerQuality(followerID)
 			self:AddExtraData(self.cache[followerID])
 			if event=="GARRISON_FOLLOWER_UPGRADED" then
 				self:AddAbilities(self.cache[followerID])