PDA

View Full Version : single starting point


Dominatus
10-25-2002, 02:50 PM
I have searched through the forums and found one thread about making a static/common starting zone but am confused as to how to modify the database.cpp file to get that to work. Can anyone tell me which line(s) needs modified?? A cut and paste would be wonderful! :D

tia

Xarslik
10-25-2002, 10:59 PM
As of now the starting point is read from the PlayerProfile struct created after the creation of your character. The current zone information is stored based upon the starting zone selected at the client. Right now there is no code that retrieves the starting point from a database variable, therefore you must edit the code manually and recompile if you wish to change the start point globally. However this does NOT change bind points.

Anyway, find the "CreateCharacter" method declaration (actual line is "bool Database::CreateCharacter(int32 account_id, PlayerProfile_Struct* pp) {"), and within it look for:
end += sprintf(end, "UPDATE character_ SET zonename=\'%s\', x = %f, y = %f, z = %f, profile=", GetZoneName(pp->current_zone), pp->x, pp->y, pp->z);
Then, comment out\remove the "GetZoneName(pp->current_zone)" part, and replace it with the zone's short name (eg "arena"). Then if you wish to change the location you start in it, change pp->x, pp->y, and pp->z to the new loc. So, for example, if you wanted to set the start zone as Temple of Veeshan, at /loc 1030, -100, 50 - you would use the following code:
end += sprintf(end, "UPDATE character_ SET zonename=\'%s\', x = %f, y = %f, z = %f, profile=", "templeveeshan", -100.0f, 1030.0f, 50.0f);

Hope that helps.

Dominatus
10-26-2002, 12:03 PM
Great!! That is exactly what I was looking for! Many thanks...

:)