Browse Source

Channels & Typo

Autotraders dont join any channels nomore
Fixed a small typo for vending entry loading
Lemongrass3110 11 năm trước cách đây
mục cha
commit
ef0515873e
2 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 2 0
      src/map/channel.c
  2. 1 1
      src/map/vending.c

+ 2 - 0
src/map/channel.c

@@ -119,6 +119,8 @@ int channel_delete(struct Channel *channel) {
 int channel_join(struct Channel *channel, struct map_session_data *sd) {
 	if(!channel || !sd)
 		return -1;
+	if(sd->state.autotrade)
+		return 0; // fake success
 	if(channel_haspc(channel,sd)==1)
 		return -2;
 

+ 1 - 1
src/map/vending.c

@@ -593,7 +593,7 @@ void do_init_vending_autotrade( void ){
 			if( SQL_ERROR == Sql_Query(mmysql_handle, 
 				"SELECT `cartinventory_id`, `amount`, `price`"
 				"FROM `%s`"
-				"WHERE `vending_id` = %d"
+				"WHERE `vending_id` = %d "
 				"ORDER BY `index` ASC;", vending_items_db, vending->vendor_id ) ) {
 				Sql_ShowDebug(mmysql_handle);
 				return;