View Single Post
  #4  
Old 12-03-2012, 02:19 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by sssssssssss View Post
I am sending triggers. I keep them stored client array because I'm just improving on what was already there, but if I just trigger the message straight through there is no record, and my system shows a record of past messages for the player.

I also have buttons that show a certain category (e.g. masses, or guild messages), which is why I made it like it is as well.
Do you really need to store your message data in a client variable? Does the server really need to be keeping track of all of that? Sounds like you could happily store the messages clientside in a flag of your messages weapon.

Quote:
Even in the thing you posted above, I'd still have to separately show mass, tell, guild, and system messages, and then show them all at once. Granted sorting them all in one array might be easier to separate than add together, but also I'm figuring the large amount those variables could turn into on some categories, and prefer them separated.
There's still no reason that I can discern for storing them the way you are. When you send a trigger to the client, include the message. Let the messages system then add it to the message list you're storing in a weapon flag. If you need to do filtering, just loop through backwards until you get n number of messages of the appropriate category (however many past messages you want to display).

I'm not sure what you mean by the "large amount those variables could turn into".

There's really no need for an array anywhere here as far as I can tell except possibly in the implementation of the messages display clientside.
__________________
Reply With Quote