Browse Source

spawn move close_heading needed to also update spawn_location_placement

the spawn_location_placement heading must match close heading
Image 4 years ago
parent
commit
0091eedd0a
1 changed files with 6 additions and 0 deletions
  1. 6 0
      EQ2/source/WorldServer/client.cpp

+ 6 - 0
EQ2/source/WorldServer/client.cpp

@@ -1168,6 +1168,12 @@ bool Client::HandlePacket(EQApplicationPacket *app) {
 						_snprintf(query, 256, "closed_heading=%f,include_heading=1", newHeading);
 						if (database.UpdateSpawnWidget(widget->GetWidgetID(), query))
 							SimpleMessage(CHANNEL_COLOR_YELLOW, "Successfully saved widget close heading information.");
+
+						if (spawn->GetSpawnLocationID())
+						{
+							Query query;
+							query.RunQuery2(Q_INSERT, "update spawn_location_placement set heading = %f where id = %u", newHeading, spawn->GetSpawnLocationID());
+						}
 					}
 					else
 						SimpleMessage(CHANNEL_COLOR_YELLOW, "Spawn is not widget, unable to set close heading information.");