Przeglądaj źródła

* Added Karma and Manner to const.txt
* Delete players' ID from id_db when kicking everyone from the map-server due to char disconnection -- Fixes an odd crash with lazy mob AI

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

(no author) 20 lat temu
rodzic
commit
1d1976479b
4 zmienionych plików z 26 dodań i 0 usunięć
  1. 11 0
      Changelog.txt
  2. 2 0
      db/const.txt
  3. 1 0
      src/map/map.c
  4. 12 0
      src/map/pc.c

+ 11 - 0
Changelog.txt

@@ -1,6 +1,17 @@
 Date	Added
 
 01/31
+        * Added Karma and Manner to const.txt
+          -- To change a player's alignment to more Good/Evil in scripting for example,
+             use:
+                 set Karma, Karma + <number here>;
+
+             In older exe's (11-08 or older) you can actually check your karma in the
+             character alignment screen (alt-A)
+             The rest is up to your scripting creativity ^^
+
+        * Delete players' ID from id_db when kicking everyone from the map-server due
+          to char disconnection -- Fixes an odd crash with lazy mob AI [celest]
 	* Added at(@) command @autoloot, which turns autoloot on or off for the
 	  player who uses it [Upa-Kun]
 01/29

+ 2 - 0
db/const.txt

@@ -110,6 +110,8 @@ MaxHp		6	1
 Sp		7	1
 MaxSp		8	1
 BaseJob		119	1
+Karma		4
+Manner		5
 
 bMaxHP		6
 bMaxSP		8

+ 1 - 0
src/map/map.c

@@ -1094,6 +1094,7 @@ int map_quit(struct map_session_data *sd) {
 	} 
 	strdb_erase(nick_db,sd->status.name);
 	numdb_erase(charid_db,sd->status.char_id);
+	numdb_erase(id_db,sd->bl.id);
 	free(sd->reg);
 	free(sd->regstr);
 

+ 12 - 0
src/map/pc.c

@@ -4748,6 +4748,12 @@ int pc_readparam(struct map_session_data *sd,int type)
 	case SP_LUK:
 		val= sd->status.luk;
 		break;
+	case SP_KARMA:	// celest
+		val = sd->status.karma;
+		break;
+	case SP_MANNER:
+		val = sd->status.manner;
+		break;
 	case SP_FAME:
 		val= sd->fame;
 		break;
@@ -4877,6 +4883,12 @@ int pc_setparam(struct map_session_data *sd,int type,int val)
 	case SP_LUK:
 		sd->status.luk = val;
 		break;
+	case SP_KARMA:
+		sd->status.karma = val;
+		break;
+	case SP_MANNER:
+		sd->status.manner = val;
+		break;
 	case SP_FAME:
 		sd->fame = val;
 		break;