Go Back   WowAce Forums > Addon Chat > Libraries
Libraries Threads for new libraries and mixins.

Reply
 
Thread Tools
Old 05-24-2010   #21
myrroddin
Amazing Member
 
Join Date: May 2006
Location: Edmonton, Canada
Posts: 1,150
Send a message via MSN to myrroddin
Default Re: LibGuildBankComm-1.0 Official Thread

If I add AceSerializer-3.0, then I might as well go for AceComm-3.0, AceEvent-3.0, etc, and embed Ace3 in favour of ChatThrottleLib. Not a big issue, as I started the project with Ace3, but got advised not to go that route.

Man, I am getting confused! Should of taken the blue pill....
myrroddin is offline   Reply With Quote
Old 05-24-2010   #22
Cyprias
Junior Member
 
Join Date: Jun 2009
Posts: 75
Default Re: LibGuildBankComm-1.0 Official Thread

Nah, you don't need AceAddon, AceEvent, AceComm. just ChatThottleLib and AceSerializer would do.
Cyprias is offline   Reply With Quote
Old 05-24-2010   #23
myrroddin
Amazing Member
 
Join Date: May 2006
Location: Edmonton, Canada
Posts: 1,150
Send a message via MSN to myrroddin
Default Re: LibGuildBankComm-1.0 Official Thread

Updated to r7
myrroddin is offline   Reply With Quote
Old 05-24-2010   #24
myrroddin
Amazing Member
 
Join Date: May 2006
Location: Edmonton, Canada
Posts: 1,150
Send a message via MSN to myrroddin
Default Re: LibGuildBankComm-1.0 Official Thread

r8 looks like this:
http://paste.wowace.com/2052/
Much thanks to Cyprias for the help. Not finished, but a lot closer.
myrroddin is offline   Reply With Quote
Old 05-24-2010   #25
lilsparky
Amazing Member
 
lilsparky's Avatar
 
Join Date: Jun 2007
Location: los angeles
Posts: 1,639
Default Re: LibGuildBankComm-1.0 Official Thread

you're sending the entire guildbank on each bank close? is that right?

wouldn't it make more sense to just send the slots that have changed?

when you open the frame/change tabs, compare each slot to your internal record of the guild bank info. record any changes in a table (something like bankDelta[#bankDelta+1] = { slotNum = #, tabNum = #, itemString = string, etc }).

when you close the frame, broadcast that data and apply it to your internal bank data.

i would think the only time you need to transmit the entire contents of the bank is when somebody first logs in. form there, it's just a matter of sending the changes.

if you're concerned about going out of sync, you could come up with some kind of checksum that you send as well that would be a way to fall back to a retransmit if somebody loses sync.

$.02
lilsparky is offline   Reply With Quote
Old 05-24-2010   #26
Xinhuan
Asian Sheep Lover
 
Xinhuan's Avatar
 
Join Date: Aug 2007
Location: Singapore
Posts: 4,033
Default Re: LibGuildBankComm-1.0 Official Thread

Wouldn't work. Different players will have different changesets as well as disconnected change sets.
__________________
Author/Maintainer of Postal, Omen3, GemHelper, BankItems, WoWEquip, GatherMate, Routes, HandyNotes and some others.
Xinhuan is offline   Reply With Quote
Old 05-24-2010   #27
Starinnia
Hero Member
 
Starinnia's Avatar
 
Join Date: Jun 2006
Location: Chicago
Posts: 654
Default Re: LibGuildBankComm-1.0 Official Thread

Yeah, sending only changed slots does not work. I attempted using that method in a communications module for MobileVault. There was no way to maintain consistency for all the users involved. There are too many opportunities for people to miss changes and then never have them fully propagate through the user base.
__________________
Author of SimpleMD, MobileVault, MillHelp, Sifter, ComboPointsRedux, RealID Toons, and Prescription.
Starinnia is offline   Reply With Quote
Old 05-24-2010   #28
myrroddin
Amazing Member
 
Join Date: May 2006
Location: Edmonton, Canada
Posts: 1,150
Send a message via MSN to myrroddin
Default Re: LibGuildBankComm-1.0 Official Thread

Xinhuan and Starinnia, since you responded earlier that this lib could be useful when complete for your own addons, I would like to ask if the data format I am using is standardized enough, or do I need to tweak it, or will you adjust code on your end?
Code:
lib.guildBank[guildName].money
lib.guildBank[guildName].info[page][slot]
etc... The final variable names may change depending on how I code the scan, but you get the idea. I have purposely used GetGuildBankMoney() to get the funds in raw copper, and left the conversion into higher coins up to authors for localization reasons.

** EDIT **
I realize that GUILDBANK_UPDATE_MONEY() fires even when someone isn't actually at the bank; guild repairs, the possible tithing system Blizzard talked about for Cataclysm.. What I did not want to do is fire off a comm and a callback for that, as those could be updated incredibly frequently. Therefore, I chose to fire the callback and comm on GUILDBANKFRAME_CLOSED() which means lib.guildBank[guildName].money may not be accurate in a timely fashion. Thoughts?

Last edited by myrroddin; 05-24-2010 at 10:39 AM.
myrroddin is offline   Reply With Quote
Old 05-24-2010   #29
Xinhuan
Asian Sheep Lover
 
Xinhuan's Avatar
 
Join Date: Aug 2007
Location: Singapore
Posts: 4,033
Default Re: LibGuildBankComm-1.0 Official Thread

There needs extra data such as tab name, tab icon, whether you can see that tab or not, etc.
__________________
Author/Maintainer of Postal, Omen3, GemHelper, BankItems, WoWEquip, GatherMate, Routes, HandyNotes and some others.
Xinhuan is offline   Reply With Quote
Old 05-24-2010   #30
Starinnia
Hero Member
 
Starinnia's Avatar
 
Join Date: Jun 2006
Location: Chicago
Posts: 654
Default Re: LibGuildBankComm-1.0 Official Thread

Make sure that the stack sizes are included as well, in addition to what Xinhuan said.
__________________
Author of SimpleMD, MobileVault, MillHelp, Sifter, ComboPointsRedux, RealID Toons, and Prescription.
Starinnia is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:45 AM.