Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #31  
Old 03-12-2012, 03:09 AM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
Quote:
Originally Posted by Draenin View Post
Yup. Did you even read mine?

Yeah, but when you cache that information, you don't need to have clientr.variables for every little piece of information on every weapon or item. Only pieces of information which can be manipulated by the player's actions.
Quote:
Originally Posted by salesman View Post
Just remember to only store information that you will actually use...such as the information that will be displayed in an inventory or on the player's HUD.


Quote:
Originally Posted by Draenin View Post
A simple query is enough to fetch all the information associated with a record you've created in a database table, and that's way easier than trying to fetch those pieces of information one-by-one.
Not really sure what you're trying to say with this.
__________________
Reply With Quote
  #32  
Old 03-12-2012, 08:16 AM
Draenin Draenin is offline
Magnificent Bastard
Draenin's Avatar
Join Date: Dec 2004
Location: Bermuda Triangle
Posts: 6,790
Draenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud ofDraenin has much to be proud of
Send a message via AIM to Draenin Send a message via MSN to Draenin Send a message via Yahoo to Draenin Send a message via Skype™ to Draenin
Quote:
Originally Posted by salesman View Post
Not really sure what you're trying to say with this.
I'm saying that you can fetch information more efficiently by just running a query for a single record, pulling all the associated information from that record's row.

So if you want to load information for a 'Wooden Sword,' you just run a query for a record with that name entered under the 'itemname' column, and then load other information from that record's row, like the 'itemthumbnail' and 'itemtype' and so forth.

The advantage of this is that instead of having to store all of this data on a player's account, the only information you'd really need to read from the account is what the player currently has equipped. It's the only thing that the client needs to read from a player because it's under a player's direct control.
Reply With Quote
  #33  
Old 03-12-2012, 10:49 AM
jamitsu89 jamitsu89 is offline
Registered User
Join Date: Jun 2011
Posts: 27
jamitsu89 is an unknown quantity at this point
Quote:
Originally Posted by Draenin View Post
It's the only thing that the client needs to read from a player because it's under a player's direct control.
You do realise you're both debating the same thing?

Salesman never suggested querying more than a single record for a single entity; Unless of course you have a viable reason such as an inventory and you do not wish to wait for an item description to load every time you hover over an item for a description. In which case, store it in clientr. flags or cache it in a weapon, but there's no benefit of one over the other.

Last edited by jamitsu89; 03-12-2012 at 04:09 PM..
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 +2. The time now is 09:43 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (C) 1998-2008 Linux cyberjoueurs All Rights Reserved.