Selaa lähdekoodia

Misc updates
* Updated atcommand doc
* Prevernt to use (at)refresh when Lapine UI is opened

Cydh 5 vuotta sitten
vanhempi
commit
0368896510
3 muutettua tiedostoa jossa 24 lisäystä ja 3 poistoa
  1. 2 1
      conf/msg_conf/map_msg.conf
  2. 14 0
      doc/atcommands.txt
  3. 8 2
      src/map/atcommand.cpp

+ 2 - 1
conf/msg_conf/map_msg.conf

@@ -553,7 +553,8 @@
 //541: %.0s%.0sSomeone got %s
 542: '%s' stole %s's %s (chance: %0.02f%%)
 //542: %.0s%.0sSomeone stole %s
-// 543~548 are not used (previously @away messages)
+543: Cannot use @refresh when Lapine UI is opened.
+//544-548: free
 
 // @autotrade
 549: You should have a shop open to use @autotrade.

+ 14 - 0
doc/atcommands.txt

@@ -1135,6 +1135,20 @@ Give or remove a cart to a player and also change the cart skin based on ID:
 
 ---------------------------------------
 
+@synthesisui <id>
+
+Open Lapine Synthesis UI. Valid 'id' can be found in db/[pre-]re/item_synthesis.yml
+(available for PACKETVER >= 20160525)
+
+---------------------------------------
+
+@upgradeui <id>
+
+Open Lapine Upgrade UI. Valid 'id' can be found in db/[pre-]re/item_upgrade.yml
+(available for PACKETVER >= 20160525)
+
+---------------------------------------
+
 ==============================
 | 5. Administrative Commands |
 ==============================

+ 8 - 2
src/map/atcommand.cpp

@@ -7074,6 +7074,10 @@ ACMD_FUNC(mute)
 ACMD_FUNC(refresh)
 {
 	nullpo_retr(-1, sd);
+	if (sd->state.lapine_ui) {
+		clif_displaymessage(sd->fd, msg_txt(sd, 543));
+		return -1;
+	}
 	clif_refresh(sd);
 	return 0;
 }
@@ -10073,7 +10077,8 @@ ACMD_FUNC(synthesisui) {
 		clif_displaymessage(fd, "Please input itemid of synthesis id.");
 		return -1;
 	}
-	item_synthesis_open(sd, itemid);
+	if (!item_synthesis_open(sd, itemid))
+		return -1;
 #else
 	clif_displaymessage(fd, "Client is not supported.");
 #endif
@@ -10089,7 +10094,8 @@ ACMD_FUNC(upgradeui) {
 		clif_displaymessage(fd, "Please input itemid of upgrade id.");
 		return -1;
 	}
-	item_upgrade_open(sd, itemid);
+	if (!item_upgrade_open(sd, itemid))
+		return -1;
 #else
 	clif_displaymessage(fd, "Client is not supported.");
 #endif