Former Staff flygun 304 Posted March 28, 2015 Former Staff Share Posted March 28, 2015 Hello guys I'm a bit confused with some of the functions in the server source first thing I'm reading the source at the moment trying to understand how it's work (I'm not talking about how the server is working with the cores and db ....etc)I'm talking about some functions like this if (GetHorseLevel() <= 0) return; now this means that if the horse level is less or equals "0" don't continue .... now the problem is when I click (right-click) on this "GetHorseLevel" (I'm using VS2013) and click on "Go To definition" it sends me to "CHorseRider class" in horse_rider.h now the thing i can't understand is how the source gets the level of the horse ??? there are a lot of other things like this (i can't under stand) but i think if I realized this function i'll understand the others Sorry for bad english Best Regards FlyGun Link to comment Share on other sites More sharing options...
Premium Cataclismo 86 Posted March 28, 2015 Premium Share Posted March 28, 2015 The function from the CHorseRider class tells you how it gets the horse level o.O Link to comment Share on other sites More sharing options...
Former Staff flygun 304 Posted March 28, 2015 Author Former Staff Share Posted March 28, 2015 The function from the CHorseRider class tells you how it gets the horse level o.O no O.o ... can you show me the code that's tells you this ??? the horse level is taken from the sql table but how ?? Link to comment Share on other sites More sharing options...
JachuPL 308 Posted March 28, 2015 Share Posted March 28, 2015 The function from the CHorseRider class tells you how it gets the horse level o.O no O.o ... can you show me the code that's tells you this ??? the horse level is taken from the sql table but how ?? find CHARACTER::SetPlayerProto and you will know. The definition of the struct passed in param is inside common/tables.h Link to comment Share on other sites More sharing options...
Former Staff flygun 304 Posted March 28, 2015 Author Former Staff Share Posted March 28, 2015 The function from the CHorseRider class tells you how it gets the horse level o.O no O.o ... can you show me the code that's tells you this ??? the horse level is taken from the sql table but how ?? find CHARACTER::SetPlayerProto and you will know. The definition of the struct passed in param is inside common/tables.h thanks ... i found the struct "struct THorseInfo" ... i'll read some code now Link to comment Share on other sites More sharing options...
Former Staff flygun 304 Posted April 3, 2015 Author Former Staff Share Posted April 3, 2015 The function from the CHorseRider class tells you how it gets the horse level o.O no O.o ... can you show me the code that's tells you this ??? the horse level is taken from the sql table but how ?? find CHARACTER::SetPlayerProto and you will know. The definition of the struct passed in param is inside common/tables.h ok ... i see the tables and everything ... how this tables get there informationes from the database (sql) ?? Link to comment Share on other sites More sharing options...
Solution JachuPL 308 Posted April 5, 2015 Solution Share Posted April 5, 2015 On start, game sends packet to DB HEADER_GD_BOOT or sth like that. DB collects all the necessary data, pack it and returns to game. Game gets initialized with data get from DB and it launches. If the data is wrong, game shuts down. For a player, your client sends HEADER_CG_LOGIN3 packet to game. Game forwards this packet to DB. DB gets the packet, selects all the data from table (look for QUERY_PLAYER_LOAD or sth like that) and returns it to game. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now