Browse Source

- Fixed Max Guardians max = 8 (no need to increase this value for woe 2.0 as non indexed guardians are set outside of the array).
- Hunter traps have 3500 HP, they are not removed by just one hit. (This also fix the bug you can't move traps with arrow shower).
- Some cleanups.

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

zephyrus 17 năm trước cách đây
mục cha
commit
d6c303341b
3 tập tin đã thay đổi với 30 bổ sung10 xóa
  1. 1 1
      src/char_sql/char.c
  2. 1 1
      src/common/mmo.h
  3. 28 8
      src/map/skill.c

+ 1 - 1
src/char_sql/char.c

@@ -2940,7 +2940,7 @@ int parse_char(int fd)
 		{	// already authed client
 			struct online_char_data* data = (struct online_char_data*)idb_get(online_char_db, sd->account_id);
 			if( data == NULL || data->server == -1) //If it is not in any server, send it offline. [Skotlex]
-													//send -1 as char id (99 means at char select) [Kevin]
+				//send -1 as char id (99 means at char select) [Kevin]
 				set_char_offline(-1,sd->account_id);
 			if( data != NULL && data->fd == fd)
 				data->fd = -1;

+ 1 - 1
src/common/mmo.h

@@ -49,7 +49,7 @@
 #define MAX_GUILDSKILL	15 // increased max guild skills because of new skills [Sara-chan]
 #define MAX_GUILDCASTLE 34	// Updated to include new entries for WoE:SE. [L0ne_W0lf]
 #define MAX_GUILDLEVEL 50
-#define MAX_GUARDIANS 46	//Local max per castle. [Skotlex]
+#define MAX_GUARDIANS 8	//Local max per castle. [Skotlex]
 #define MAX_QUEST 25 //Max quests for a PC
 #define MAX_QUEST_OBJECTIVES 3 //Max quest objectives for a quest
 

+ 28 - 8
src/map/skill.c

@@ -6439,6 +6439,16 @@ struct skill_unit_group* skill_unitsetting (struct block_list *src, short skilli
 		case WZ_ICEWALL:
 			val1 = (skilllv <= 1) ? 500 : 200 + 200*skilllv;
 			break;
+		case HT_LANDMINE:
+		case HT_ANKLESNARE:
+		case HT_SHOCKWAVE:
+		case HT_SANDMAN:
+		case HT_FLASHER:
+		case HT_FREEZINGTRAP:
+		case HT_TALKIEBOX:
+		case HT_SKIDTRAP:
+			val1 = 3500;
+			break;
 		case GS_DESPERADO:
 			val1 = abs(layout->dx[i]);
 			val2 = abs(layout->dy[i]);
@@ -7274,13 +7284,23 @@ int skill_unit_ondamaged (struct skill_unit *src, struct block_list *bl, int dam
 	nullpo_retr(0, src);
 	nullpo_retr(0, sg=src->group);
 
-	if (skill_get_inf2(sg->skill_id)&INF2_TRAP && damage > 0)
-		skill_delunitgroup(NULL,sg);
-	else 
-	switch(sg->unit_id){
+	switch( sg->unit_id )
+	{
+	case UNT_SKIDTRAP:
+	case UNT_LANDMINE:
+	case UNT_SHOCKWAVE:
+	case UNT_SANDMAN:
+	case UNT_FLASHER:
+	case UNT_FREEZINGTRAP:
+	case UNT_TALKIEBOX:
+	case UNT_ANKLESNARE:
 	case UNT_ICEWALL:
 		src->val1-=damage;
 		break;
+	case UNT_BLASTMINE:
+	case UNT_CLAYMORETRAP:
+		skill_blown(bl, &src->bl, 2, -1, 0);
+		break;
 	default:
 		damage = 0;
 		break;
@@ -8133,15 +8153,15 @@ int skill_check_condition(struct map_session_data* sd, short skill, short lv, in
 				continue;// no item
 			if( itemid_isgemstone(itemid[i]) && skill != HW_GANBANTEIN )
 			{
-				if (sd->special_state.no_gemstone)
+				if( sd->special_state.no_gemstone )
 				{	//Make it substract 1 gem rather than skipping the cost.
-					if (--amount[i] < 1)
+					if( --amount[i] < 1 )
 						continue;
 				}
 				if(sc && sc->data[SC_INTOABYSS])
 				{
 					if( skill != SA_ABRACADABRA )
-					continue;
+						continue;
 					else if( --amount[i] < 1 )
 						amount[i] = 1; // Hocus Pocus allways use at least 1 gem
 				}
@@ -9098,7 +9118,7 @@ static int skill_trap_splash (struct block_list *bl, va_list ap)
 int skill_enchant_elemental_end (struct block_list *bl, int type)
 {
 	struct status_change *sc;
-	const	enum sc_type scs[] = { SC_ENCPOISON, SC_ASPERSIO, SC_FIREWEAPON, SC_WATERWEAPON, SC_WINDWEAPON, SC_EARTHWEAPON, SC_SHADOWWEAPON, SC_GHOSTWEAPON, SC_ENCHANTARMS };
+	const enum sc_type scs[] = { SC_ENCPOISON, SC_ASPERSIO, SC_FIREWEAPON, SC_WATERWEAPON, SC_WINDWEAPON, SC_EARTHWEAPON, SC_SHADOWWEAPON, SC_GHOSTWEAPON, SC_ENCHANTARMS };
 	int i;
 	nullpo_retr(0, bl);
 	nullpo_retr(0, sc= status_get_sc(bl));