Browse Source

- Should have fixed the login-sql crash when passed user-name's length is beyond the limit.
- Removed setting mob_ghostring_fix
- Changed setting attack_attr_none to affect all neutral-element attacks. Basicly, this setting is now used to determine who can hit for full damage always when using neutral-attacks (defaults to non-players)


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

skotlex 19 years ago
parent
commit
2c74fc0254

+ 5 - 0
Changelog-Trunk.txt

@@ -4,6 +4,11 @@ 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.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 
 2006/08/10
 2006/08/10
+	* Should have fixed the login-sql crash when passed user-name's length is
+	  beyond the limit. [Skotlex]
+	* Changed setting attack_attr_none to affect all neutral-element attacks.
+	  Basicly, this setting is now used to determine who can hit for full damage
+	  always when using neutral-attacks (defaults to non-players) [Skotlex]
 	* Fixed two instances in the login-sql server where the ip in the log-login
 	* Fixed two instances in the login-sql server where the ip in the log-login
 	  table was being stored backwards. [Skotlex]
 	  table was being stored backwards. [Skotlex]
 	* Now when a skill's range is 0 and the skill is NOT casted on self, it
 	* Now when a skill's range is 0 and the skill is NOT casted on self, it

+ 5 - 0
conf-tmpl/Changelog.txt

@@ -1,4 +1,9 @@
 Date	Added
 Date	Added
+2006/08/10
+	* Removed setting mob_ghostring_fix [Skotlex]
+	* Changed setting attack_attr_none to affect all neutral-element attacks.
+	  Basicly, this setting is now used to determine who can hit for full damage
+	  always when using neutral-attacks (defaults to non-players) [Skotlex]
 2006/08/09
 2006/08/09
 	* Change the default of attack_attr_none to all classes except players.
 	* Change the default of attack_attr_none to all classes except players.
 	  This means that pet/mobs/homun will always do normal attacks with
 	  This means that pet/mobs/homun will always do normal attacks with

+ 2 - 1
conf-tmpl/battle/battle.conf

@@ -132,7 +132,8 @@ vit_penalty_count_lv: 3
 // Change attacker's direction to face opponent on every attack? (Note 4)
 // Change attacker's direction to face opponent on every attack? (Note 4)
 attack_direction_change: 15
 attack_direction_change: 15
 
 
-// Remove elemental modifiers from normal attacks (skills will always have elemental modifiers)? (Note 4)
+// For those who is set, attacks of Neutral element will not get any elemental
+// modifiers (they will hit for full damage on Ghost types) (Note 4)
 attack_attr_none: 14
 attack_attr_none: 14
 
 
 // Rate at which equipment can break (base rate before it's modified by any skills)
 // Rate at which equipment can break (base rate before it's modified by any skills)

+ 0 - 3
conf-tmpl/battle/items.conf

@@ -76,9 +76,6 @@ item_check: no
 // On officials this is 0, but it's set to 100ms as a measure against bots/macros.
 // On officials this is 0, but it's set to 100ms as a measure against bots/macros.
 item_use_interval: 100
 item_use_interval: 100
 
 
-// The ghostring fix makes mob attacks not be affected by ghostring armor wearing players.
-mob_ghostring_fix: yes
-
 //Required level of bNoMagicDamage before Status Changes are blocked (Golden Thief Bug card).
 //Required level of bNoMagicDamage before Status Changes are blocked (Golden Thief Bug card).
 //For example, if left at 50. An item can give bNoMagicDamage,40;
 //For example, if left at 50. An item can give bNoMagicDamage,40;
 // which reduces magic damage by 40%, but does not blocks status changes.
 // which reduces magic damage by 40%, but does not blocks status changes.

+ 1 - 1
src/login_sql/login.c

@@ -1586,7 +1586,7 @@ int parse_login(int fd) {
 			result=mmo_auth(&account, fd);
 			result=mmo_auth(&account, fd);
 
 
 
 
-			jstrescapecpy(t_uid,(char*)RFIFOP(fd, 6));
+			jstrescapecpy(t_uid,account.userid);
 			if(result==-1){
 			if(result==-1){
 				// as we have queried account level earlier in mmo_auth anyway, no need to do this again [zzo]
 				// as we have queried account level earlier in mmo_auth anyway, no need to do this again [zzo]
 				//		    int gm_level = isGM(account.account_id); // removed by [zzo]
 				//		    int gm_level = isGM(account.account_id); // removed by [zzo]

+ 7 - 12
src/map/battle.c

@@ -1788,19 +1788,16 @@ static struct Damage battle_calc_weapon_attack(
 	if(skill_num==TF_POISON)
 	if(skill_num==TF_POISON)
 		ATK_ADD(15*skill_lv);
 		ATK_ADD(15*skill_lv);
 
 
-	if (skill_num || !(battle_config.attack_attr_none&src->type))
+	if (s_ele != ELE_NEUTRAL || !(battle_config.attack_attr_none&src->type))
 	{	//Elemental attribute fix
 	{	//Elemental attribute fix
-		if	(!(!sd && tsd && battle_config.mob_ghostring_fix && tstatus->def_ele==ELE_GHOST))
+		if (wd.damage > 0)
 		{
 		{
-			if (wd.damage > 0)
-			{
-				wd.damage=battle_attr_fix(src,target,wd.damage,s_ele,tstatus->def_ele, tstatus->ele_lv);
-				if(skill_num==MC_CARTREVOLUTION) //Cart Revolution applies the element fix once more with neutral element
-					wd.damage = battle_attr_fix(src,target,wd.damage,ELE_NEUTRAL,tstatus->def_ele, tstatus->ele_lv);
-			}
-			if (flag.lh && wd.damage2 > 0)
-				wd.damage2 = battle_attr_fix(src,target,wd.damage2,s_ele_,tstatus->def_ele, tstatus->ele_lv);
+			wd.damage=battle_attr_fix(src,target,wd.damage,s_ele,tstatus->def_ele, tstatus->ele_lv);
+			if(skill_num==MC_CARTREVOLUTION) //Cart Revolution applies the element fix once more with neutral element
+				wd.damage = battle_attr_fix(src,target,wd.damage,ELE_NEUTRAL,tstatus->def_ele, tstatus->ele_lv);
 		}
 		}
+		if (flag.lh && wd.damage2 > 0)
+			wd.damage2 = battle_attr_fix(src,target,wd.damage2,s_ele_,tstatus->def_ele, tstatus->ele_lv);
 		if(sc && sc->data[SC_WATK_ELEMENT].timer != -1)
 		if(sc && sc->data[SC_WATK_ELEMENT].timer != -1)
 		{	//Descriptions indicate this means adding a percent of a normal attack in another element. [Skotlex]
 		{	//Descriptions indicate this means adding a percent of a normal attack in another element. [Skotlex]
 			int damage= battle_calc_base_damage(sstatus, &sstatus->rhw, sc, tstatus->size, sd, (flag.arrow?2:0));
 			int damage= battle_calc_base_damage(sstatus, &sstatus->rhw, sc, tstatus->size, sd, (flag.arrow?2:0));
@@ -3590,7 +3587,6 @@ static const struct battle_data_short {
 	{ "show_party_share_picker",           &battle_config.party_show_share_picker },
 	{ "show_party_share_picker",           &battle_config.party_show_share_picker },
 	{ "party_update_interval",             &battle_config.party_update_interval },
 	{ "party_update_interval",             &battle_config.party_update_interval },
 	{ "party_item_share_type",             &battle_config.party_share_type },
 	{ "party_item_share_type",             &battle_config.party_share_type },
-	{ "mob_ghostring_fix",                 &battle_config.mob_ghostring_fix		},
 	{ "attack_attr_none",                  &battle_config.attack_attr_none		},
 	{ "attack_attr_none",                  &battle_config.attack_attr_none		},
 	{ "gx_allhit",                         &battle_config.gx_allhit				},
 	{ "gx_allhit",                         &battle_config.gx_allhit				},
 	{ "gx_disptype",                       &battle_config.gx_disptype				},
 	{ "gx_disptype",                       &battle_config.gx_disptype				},
@@ -4007,7 +4003,6 @@ void battle_set_defaults() {
 	battle_config.party_hp_mode = 0;
 	battle_config.party_hp_mode = 0;
 	battle_config.party_show_share_picker = 0;
 	battle_config.party_show_share_picker = 0;
 	battle_config.attack_attr_none = ~BL_PC;
 	battle_config.attack_attr_none = ~BL_PC;
-	battle_config.mob_ghostring_fix = 1;
 	battle_config.gx_allhit = 1;
 	battle_config.gx_allhit = 1;
 	battle_config.gx_disptype = 1;
 	battle_config.gx_disptype = 1;
 	battle_config.devotion_level_difference = 10;
 	battle_config.devotion_level_difference = 10;

+ 0 - 1
src/map/battle.h

@@ -270,7 +270,6 @@ extern struct Battle_Config {
 	unsigned short party_share_type;
 	unsigned short party_share_type;
 	unsigned short party_hp_mode;
 	unsigned short party_hp_mode;
 	unsigned short party_show_share_picker;
 	unsigned short party_show_share_picker;
-	unsigned short mob_ghostring_fix;
 	unsigned short attack_attr_none;
 	unsigned short attack_attr_none;
 	int item_rate_mvp, item_rate_common, item_rate_common_boss, item_rate_card, item_rate_card_boss,	// added support for MVP drops [Reddozen]
 	int item_rate_mvp, item_rate_common, item_rate_common_boss, item_rate_card, item_rate_card_boss,	// added support for MVP drops [Reddozen]
 		item_rate_equip, item_rate_equip_boss, item_rate_heal, item_rate_heal_boss, item_rate_use,
 		item_rate_equip, item_rate_equip_boss, item_rate_heal, item_rate_heal_boss, item_rate_use,

+ 1 - 1
src/map/trade.c

@@ -151,7 +151,7 @@ int impossible_trade_check(struct map_session_data *sd) {
 	// re-added! [celest]
 	// re-added! [celest]
 	// remove equiped items (they can not be trade)
 	// remove equiped items (they can not be trade)
 	for (i = 0; i < MAX_INVENTORY; i++)
 	for (i = 0; i < MAX_INVENTORY; i++)
-		if (inventory[i].nameid > 0 && inventory[i].equip && !(inventory[i].equip & 0x8000))
+		if (inventory[i].nameid > 0 && inventory[i].equip && !(inventory[i].equip & EQP_AMMO))
 			memset(&inventory[i], 0, sizeof(struct item));
 			memset(&inventory[i], 0, sizeof(struct item));
 
 
 	// check items in player inventory
 	// check items in player inventory