Ulminia,
It has been a while since I last was able to work with the wowroster code base. This last weekend I decided to finally get roster installed again using the new svn code along with the new profilers. I noticed once I logged in that the guild profiler did not fire correctly as the first printed value being the guild name was a nil value. After I reloaded my ui I was able to get the data processed like it was designed to. There for I feel that the function to get the guild name is firing to early after wow loads.
http://code.google.com/p/wowroster-prof ... e.lua?r=54line 80-120
- Code: Select all
function wowrostergp:InitState()
stat={
_server=GetRealmName(),
_player=UnitName("player"),
_guild=GetGuildInfo("player"), //being called to early
_officer=CanViewOfficerNote(),
_guilded=IsInGuild(),
_guildInfo=nil,
_loaded,
_time,
_guildNum,
Vault={},
Vaultavl=false,
};
end
function wowrostergp:gpexport()
wowrostergp:GetGuildInfo()
if(wowrpref["guild"]["trades"]) then
wowrostergp:ScanProfessions();
end
wowrostergp:Scannews();
wowrostergp:ScanGuildControl();
msg = stat["_guild"];
wowrostergp:Print(msg); //being called to early
msg = "Vault:";
tsort={};
table.foreach(stat["Vault"], function(k,v) table.insert(tsort,k) end );
table.sort(tsort);
if(table.getn(tsort)==0) then
msg=msg..wowroster.StringColorize(wowroster.colorRed," not scanned")..". - open your Guild Vault to scan";
else
for _,item in pairs(tsort) do
msg=msg .. " " .. item.."-"..stat["Vault"][item]["inv"].."/"..stat["Vault"][item]["slot"];
end
end
wowrostergp:Print(msg);
msg = "Members: "..stat["_guildNum"].." ";
wowrostergp:Print(msg);
end
The rest of the msg prints correctly with out a ui reload only need the ui reload to get the guild name which is required to save the data to the character profiler to update the guild data.