Преглед изворни кода

- There will be now warnings printed when a shop sells an item which's buy price is 20z, since those usually are "rare" items with no buyying price set. Note that this reports one fake, and that is the selling of a certain shuriken that indeed costs 20z.
- Most likely fixed client crash when xmas/wedding status runs out.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9505 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex пре 18 година
родитељ
комит
b9fd36a7cd
5 измењених фајлова са 18 додато и 3 уклоњено
  1. 6 0
      Changelog-Trunk.txt
  2. 1 1
      conf-tmpl/login_athena.conf
  3. 1 0
      src/common/utils.c
  4. 5 0
      src/map/npc.c
  5. 5 2
      src/map/status.c

+ 6 - 0
Changelog-Trunk.txt

@@ -3,6 +3,12 @@ Date	Added
 AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
+2006/12/15
+	* There will be now warnings printed when a shop sells an item which's buy
+	  price is 20z, since those usually are "rare" items with no buyying price
+	  set. Note that this reports one fake, and that is the selling of a certain
+	  shuriken that indeed costs 20z.
+	* Most likely fixed client crash when xmas/wedding status runs out.
 2006/12/14
 	* Removed "mobs being enemies of each other all the time" because, even
 	  though mobs can hit each other as they should, they will refuse to use

+ 1 - 1
conf-tmpl/login_athena.conf

@@ -27,7 +27,7 @@ login_port: 6900
 //a file, the ansi sequences are printed out.
 //If set to no the console is colorless and, if redirected, will skip the ansi
 //sequences.
-//NOTE: this setting applyes for both stdout and stderr
+//NOTE: this setting applies for both stdout and stderr
 stdout_with_ansisequence: yes
 
 //Makes server output more silent by ommitting certain types of messages:

+ 1 - 0
src/common/utils.c

@@ -18,6 +18,7 @@
 #include "../common/mmo.h"
 #include "../common/malloc.h"
 #include "../common/showmsg.h"
+#include "../common/cbasetypes.h"
 
 void dump(unsigned char *buffer, int num)
 {

+ 5 - 0
src/map/npc.c

@@ -1657,7 +1657,12 @@ static int npc_parse_shop (char *w1, char *w2, char *w3, char *w4)
 		nd->u.shop_item[pos].nameid = nameid;
 		id = itemdb_search(nameid);
 		if (value < 0)
+		{
+			if (id->value_buy == 20)
+				ShowWarning ("Selling item %s [%d] with no buying price (defaults to %d) at %s\n",
+					id->name, id->nameid, id->value_buy, current_file);
 			value = id->value_buy;
+		}
 		nd->u.shop_item[pos].value = value;
 		// check for bad prices that can possibly cause exploits
 		if (value/124. < id->value_sell/75.) {  //Clened up formula to prevent overflows.

+ 5 - 2
src/map/status.c

@@ -6039,9 +6039,12 @@ int status_change_end( struct block_list* bl , int type,int tid )
 		case SC_WEDDING:
 		case SC_XMAS:
 			if (!vd) return 0;
-			if (sd) //Load data from sd->status.* as the stored values could have changed.
+			if (sd)
+			{	//Load data from sd->status.* as the stored values could have changed.
+				//Must remove OPTION to prevent class being rechanged.
+				sc->option &= type==SC_WEDDING?~OPTION_WEDDING:~OPTION_XMAS;
 				status_set_viewdata(bl, sd->status.class_);
-			else {
+			} else {
 				vd->class_ = sc->data[type].val1;
 				vd->weapon = sc->data[type].val2;
 				vd->shield = sc->data[type].val3;