Bläddra i källkod

- You are allowed to expel guild mates that are not online now.
- Corrected damage of BloodDrain
- Moved the "already connected" checks to pc_authok, since a dual login doesn't needs to be checked until the new connection is accepted.


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

skotlex 18 år sedan
förälder
incheckning
433b9826e2
5 ändrade filer med 19 tillägg och 19 borttagningar
  1. 4 0
      Changelog-Trunk.txt
  2. 1 3
      src/map/battle.c
  3. 0 14
      src/map/clif.c
  4. 2 2
      src/map/guild.c
  5. 12 0
      src/map/pc.c

+ 4 - 0
Changelog-Trunk.txt

@@ -4,6 +4,10 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2007/02/26
+	* You are allowed to expel guild mates that are not online now.
+	* Corrected damage of BloodDrain
+	* Moved the "already connected" checks to pc_authok, since a dual login
+	  doesn't needs to be checked until the new connection is accepted.
 	* You are allowed to attack/use skills now when your cloaking level is
 	  below 3.
 	* Small change to Stone Curse that may fix the permanent "semi-stone"

+ 1 - 3
src/map/battle.c

@@ -1367,10 +1367,8 @@ static struct Damage battle_calc_weapon_attack(
 				case NPC_DARKNESSATTACK:
 				case NPC_UNDEADATTACK:
 				case NPC_TELEKINESISATTACK:
-					skillratio += 100*(skill_lv-1);
-					break;
 				case NPC_BLOODDRAIN:
-					skillratio += 100*skill_lv;
+					skillratio += 100*(skill_lv-1);
 					break;
 				case RG_BACKSTAP:
 					if(sd && sd->status.weapon == W_BOW && battle_config.backstab_bow_penalty)

+ 0 - 14
src/map/clif.c

@@ -8034,7 +8034,6 @@ void clif_parse_WantToConnection(int fd, TBL_PC* sd)
 		return;
 	} else
 	{// packet version accepted
-		TBL_PC* old_sd;
 		struct block_list* bl;
 		if( (bl=map_id2bl(account_id)) != NULL && bl->type != BL_PC )
 		{// non-player object already has that id
@@ -8046,19 +8045,6 @@ void clif_parse_WantToConnection(int fd, TBL_PC* sd)
 			clif_setwaitclose(fd);
 			return;
 		}
-		if( (old_sd=map_id2sd(account_id)) != NULL ){
-			// if same account already connected, we disconnect the 2 sessions
-			//Check for characters with no connection (includes those that are using autotrade) [durf],[Skotlex]
-			if (old_sd->state.finalsave || !old_sd->state.auth)
-				; //Previous player is not done loading.
-				//Or he has quit, but is not done saving on the charserver.
-			else if (old_sd->fd)
-				clif_authfail_fd(old_sd->fd, 2); // same id
-			else 
-				map_quit(old_sd);
-			clif_authfail_fd(fd, 8); // still recognizes last connection
-			return;
-		}
 	}
 
 	CREATE(sd, TBL_PC, 1);

+ 2 - 2
src/map/guild.c

@@ -807,8 +807,8 @@ int guild_expulsion(struct map_session_data *sd,int guild_id,
 		return 0;	//Expulsion permission
 
   	//Can't leave inside guild castles.
-	if ((tsd = map_id2sd(account_id)) == NULL ||
-		tsd->status.char_id != char_id ||
+	if ((tsd = map_id2sd(account_id)) &&
+		tsd->status.char_id == char_id &&
 		map[tsd->bl.m].flag.gvg_castle)
 		return 0;
 

+ 12 - 0
src/map/pc.c

@@ -556,6 +556,7 @@ int pc_isequip(struct map_session_data *sd,int n)
  */
 int pc_authok(struct map_session_data *sd, int login_id2, time_t connect_until_time, struct mmo_charstatus *st)
 {
+	TBL_PC* old_sd;
 	int i;
 	unsigned long tick = gettick();
 
@@ -572,6 +573,17 @@ int pc_authok(struct map_session_data *sd, int login_id2, time_t connect_until_t
 		return 1;
 	}
 
+	if( (old_sd=map_id2sd(sd->status.account_id)) != NULL ){
+		if (old_sd->state.finalsave || !old_sd->state.auth)
+			; //Previous player is not done loading, No need to kick.
+		else if (old_sd->fd)
+			clif_authfail_fd(old_sd->fd, 2); // same id
+		else 
+			map_quit(old_sd);
+		clif_authfail_fd(sd->fd, 8); // still recognizes last connection
+		return 1;
+	}
+
 	if (map_id2sd(st->account_id) != NULL)
 	{	//Somehow a second connection has managed to go through the double-connection
 		//check in clif_parse_WantToConnection! [Skotlex]