Added an optional rule value that forces startzones to be the same as the bind zone and enabled bind xyz once again.

This commit is contained in:
E Spause
2017-03-12 03:41:21 -04:00
parent 262bcf5c29
commit 04ce4f66ed
3 changed files with 13 additions and 7 deletions
+8 -6
View File
@@ -1552,12 +1552,14 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc)
database.GetSafePoints(pp.zone_id, 0, &pp.x, &pp.y, &pp.z);
}
/* Will either be the same as home or tutorial */
pp.binds[0].zoneId = pp.zone_id;
pp.binds[0].x = pp.x;
pp.binds[0].y = pp.y;
pp.binds[0].z = pp.z;
pp.binds[0].heading = pp.heading;
/* Will either be the same as home or tutorial if enabled. */
if(RuleB(World, StartZoneSameAsBindOnCreation)) {
pp.binds[0].zoneId = pp.zone_id;
pp.binds[0].x = pp.x;
pp.binds[0].y = pp.y;
pp.binds[0].z = pp.z;
pp.binds[0].heading = pp.heading;
}
Log.Out(Logs::Detail, Logs::World_Server,"Current location: %s (%d) %0.2f, %0.2f, %0.2f, %0.2f",
database.GetZoneName(pp.zone_id), pp.zone_id, pp.x, pp.y, pp.z, pp.heading);