Jump to content
  • 0

Weapon Breaker not work Skills/Cards


Question

Posted (edited)

Good afternoon everyone, I encountered the following problem.
Abilities/Skills/Cards cannot break weapons

Even if you directly specify in the skill properties to break a weapon, it will break all equipment except the weapon.

	case SM_BASH:
		if( sd && skill_lv > 5 && pc_checkskill(sd,SM_FATALBLOW)>0 ){
			//BaseChance gets multiplied with BaseLevel/50.0; 500/50 simplifies to 10 [Playtester]
			status_change_start(src,bl,SC_STUN,(skill_lv*10/4),
				skill_lv,0,0,0,skill_get_time2(skill_id,skill_lv),SCSTART_NONE);
		}
		skill_break_equip(src,src, EQP_WEAPON, 10000, BCT_SELF);
		skill_break_equip(src,src, EQP_ARMOR, 10000, BCT_SELF);
		break;



What is written in skill_break_equip corresponds to the current version of rA

/*=========================================================================
 Breaks equipment. On-non players causes the corresponding strip effect.
 - rate goes from 0 to 10000 (100.00%)
 - flag is a BCT_ flag to indicate which type of adjustment should be used
   (BCT_ENEMY/BCT_PARTY/BCT_SELF) are the valid values.
--------------------------------------------------------------------------*/
int skill_break_equip(struct block_list *src, struct block_list *bl, unsigned short where, int rate, int flag)


Can anyone tell me where to look for the problem?


====================================================

ADD

I checked (break weapon) in the most recent version of rA. The same problem is observed
Server: https://github.com/rathena/rathena  (I don't know version)
Client 20220303

Test on RE && next test on PRE-RE

config set:
equip_natural_break_rate: 10000
equip_self_break_rate: 100
equip_skill_break_rate: 100

Edited by scRO

1 answer to this question

Recommended Posts

  • 0
Posted

The issue is resolved.
In skill.cpp a list of weapons that cannot be broken is indicated

int skill_break_equip(struct block_list *src, struct block_list *bl, unsigned short where, int rate, int flag)

 

	if (sd) {
		if (sd->bonus.unbreakable_equip)
			where &= ~sd->bonus.unbreakable_equip;
		if (sd->bonus.unbreakable)
			rate -= rate*sd->bonus.unbreakable/100;
		if (where&EQP_WEAPON) {
			switch (sd->status.weapon) {
				case W_FIST:	//Bare fists should not break :P
				case W_1HAXE:
				case W_2HAXE:
				case W_MACE: // Axes and Maces can't be broken [DracoRPG]
				case W_2HMACE:
				case W_STAFF:
				case W_2HSTAFF:
				case W_BOOK: //Rods and Books can't be broken [Skotlex]
				case W_HUUMA:
				case W_DOUBLE_AA:	// Axe usage during dual wield should also prevent breaking [Neutral]
				case W_DOUBLE_DA:
				case W_DOUBLE_SA:
					where &= ~EQP_WEAPON;
			}
		}
	}

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...