Jump to content
  • 0
Sign in to follow this  
Blue Orb

change sniper traps duration in woe

Question

3 answers to this question

Recommended Posts

  • 0

Edit: I misread post thinking you wanted current time to be made 4x during WoE. Check post below.

Spoiler

 

In skill.c go to skill_unit_group()

Above this line,


	nullpo_retr(NULL, layout);
	nullpo_retr(NULL, group=skill->init_unitgroup(src,layout->count,skill_id,skill_lv,skill->get_unit_id(skill_id,flag&1)+subunt, limit, interval));

Add a code to account for whatever clause you want. In this case, you want traps to have 4x duration during WoE.


	// custom time clause goes here
	switch (skill_id) {
	case HT_ANKLESNARE:
	case HT_SHOCKWAVE:
	case HT_SANDMAN:
	case MA_SANDMAN:
	case HT_CLAYMORETRAP:
	case HT_SKIDTRAP:
	case MA_SKIDTRAP:
	case HT_LANDMINE:
	case MA_LANDMINE:
	case HT_FLASHER:
	case HT_FREEZINGTRAP:
	case MA_FREEZINGTRAP:
	case HT_BLASTMINE:
	/**
	 * Ranger
	 **/
	case RA_ELECTRICSHOCKER:
	case RA_CLUSTERBOMB:
	case RA_MAGENTATRAP:
	case RA_COBALTTRAP:
	case RA_MAIZETRAP:
	case RA_VERDURETRAP:
	case RA_FIRINGTRAP:
	case RA_ICEBOUNDTRAP:
		if (map->agit_flag == 1 || map->agit2_flag == 1)
			limit *= 4;
		break;
	}
	
	nullpo_retr(NULL, layout);
	nullpo_retr(NULL, group=skill->init_unitgroup(src,layout->count,skill_id,skill_lv,skill->get_unit_id(skill_id,flag&1)+subunt, limit, interval));

Note: Untested.

 

 

Edited by bWolfie

Share this post


Link to post
Share on other sites
  • 0

try this

from the wiki

 

Trap Duration lasts 4 times as long in War of Emperium.
case RA_ELECTRICSHOCKER:
		case RA_CLUSTERBOMB:
		case RA_MAGENTATRAP:
		case RA_COBALTTRAP:
		case RA_MAIZETRAP:
		case RA_VERDURETRAP:
		case RA_FIRINGTRAP:
		case RA_ICEBOUNDTRAP:
			{
				struct skill_condition req = skill->get_requirement(sd,skill_id,skill_lv);
				ARR_FIND(0, MAX_SKILL_ITEM_REQUIRE, i, req.itemid[i] && (req.itemid[i] == ITEMID_BOOBY_TRAP || req.itemid[i] == ITEMID_SPECIAL_ALLOY_TRAP));
				if( i != MAX_SKILL_ITEM_REQUIRE && req.itemid[i] )
					req_item = req.itemid[i];
				if( map_flag_gvg2(src->m) || map->list[src->m].flag.battleground )
					limit *= 4; // longer trap times in WOE [celest]
				if( battle_config.vs_traps_bctall && map_flag_vs(src->m) && (src->type&battle_config.vs_traps_bctall) )
					target = BCT_ALL;
			}
			break;

first off do backwards check for what limit is

 

	limit = skill->get_time(skill_id,skill_lv);

 

ok lets do this then

change this number

				if( map_flag_gvg2(src->m) || map->list[src->m].flag.battleground )
					limit *= 4;

 

 

BTW get_time is skilldata1

get_time2 is skilldata2 . . . etc 

 

in your skill db in pre re or renewal section 

Edited by Naruto

Share this post


Link to post
Share on other sites

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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.