|
@@ -20565,6 +20565,39 @@ void clif_guild_storage_log( struct map_session_data* sd, std::vector<struct gui
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
+/// Activates the client camera info or updates the client camera with the given values.
|
|
|
+/// 0A78 <type>.B <range>.F <rotation>.F <latitude>.F
|
|
|
+void clif_camerainfo( struct map_session_data* sd, bool show, float range, float rotation, float latitude ){
|
|
|
+#if PACKETVER >= 20160525
|
|
|
+ int fd = sd->fd;
|
|
|
+
|
|
|
+ WFIFOHEAD(fd, packet_len(0xa78));
|
|
|
+ WFIFOW(fd, 0) = 0xa78;
|
|
|
+ WFIFOB(fd, 2) = show;
|
|
|
+ WFIFOF(fd, 3) = range;
|
|
|
+ WFIFOF(fd, 7) = rotation;
|
|
|
+ WFIFOF(fd, 11) = latitude;
|
|
|
+ WFIFOSET(fd, packet_len(0xa78));
|
|
|
+#endif
|
|
|
+}
|
|
|
+
|
|
|
+/// Activates or deactives the client camera info or updates the camera settings.
|
|
|
+/// This packet is triggered by /viewpointvalue or /setcamera
|
|
|
+/// 0A77 <type>.B <range>.F <rotation>.F <latitude>.F
|
|
|
+void clif_parse_camerainfo( int fd, struct map_session_data* sd ){
|
|
|
+ char command[CHAT_SIZE_MAX];
|
|
|
+
|
|
|
+ // /viewpointvalue
|
|
|
+ if( RFIFOB( fd, 2 ) == 1 ){
|
|
|
+ safesnprintf( command, sizeof( command ), "%ccamerainfo", atcommand_symbol );
|
|
|
+ // /setcamera
|
|
|
+ }else{
|
|
|
+ safesnprintf( command, sizeof( command ), "%ccamerainfo %03.03f %03.03f %03.03f", atcommand_symbol, RFIFOF( fd, 3 ), RFIFOF( fd, 7 ), RFIFOF( fd, 11 ) );
|
|
|
+ }
|
|
|
+
|
|
|
+ is_atcommand( fd, sd, command, 1 );
|
|
|
+}
|
|
|
+
|
|
|
/*==========================================
|
|
|
* Main client packet processing function
|
|
|
*------------------------------------------*/
|