Fixed #138 - Updated trap visibility to official settings.
This commit is contained in:
parent
707403d0b6
commit
73243e8e9d
@ -119,10 +119,11 @@ skill_nofootset: 1
|
|||||||
// Default on official servers: 1 (for players)
|
// Default on official servers: 1 (for players)
|
||||||
gvg_traps_target_all: 1
|
gvg_traps_target_all: 1
|
||||||
|
|
||||||
// Some traps settings (add as necessary):
|
// Hunter's traps visibility setting:
|
||||||
// 1: Traps are invisible to those who come into view of it. When unset, all traps are visible at all times.
|
// 1: (Official) Many of Hunter's traps are invisible at all times.
|
||||||
// (Invisible traps can be revealed through Hunter's Detecting skill)
|
// But any player who see the Hunter laying the trap will be able to see the trap until they move out of sight of it.
|
||||||
traps_setting: 0
|
// Although, invisible traps can be revealed through Hunter's Detecting skill.
|
||||||
|
traps_setting: 1
|
||||||
|
|
||||||
// Restrictions applied to the Alchemist's Summon Flora skill (add as necessary)
|
// Restrictions applied to the Alchemist's Summon Flora skill (add as necessary)
|
||||||
// 1: Enable players to damage the floras outside of versus grounds.
|
// 1: Enable players to damage the floras outside of versus grounds.
|
||||||
|
@ -4545,7 +4545,7 @@ static void clif_graffiti(struct block_list *bl, struct skill_unit *unit, enum s
|
|||||||
/// 08c7 <lenght>.W <id> L <creator id>.L <x>.W <y>.W <unit id>.B <range>.W <visible>.B (ZC_SKILL_ENTRY3)
|
/// 08c7 <lenght>.W <id> L <creator id>.L <x>.W <y>.W <unit id>.B <range>.W <visible>.B (ZC_SKILL_ENTRY3)
|
||||||
/// 099f <lenght>.W <id> L <creator id>.L <x>.W <y>.W <unit id>.L <range>.W <visible>.B (ZC_SKILL_ENTRY4)
|
/// 099f <lenght>.W <id> L <creator id>.L <x>.W <y>.W <unit id>.L <range>.W <visible>.B (ZC_SKILL_ENTRY4)
|
||||||
/// 09ca <lenght>.W <id> L <creator id>.L <x>.W <y>.W <unit id>.L <range>.B <visible>.B <skill level>.B (ZC_SKILL_ENTRY5)
|
/// 09ca <lenght>.W <id> L <creator id>.L <x>.W <y>.W <unit id>.L <range>.B <visible>.B <skill level>.B (ZC_SKILL_ENTRY5)
|
||||||
void clif_getareachar_skillunit(struct block_list *bl, struct skill_unit *unit, enum send_target target) {
|
void clif_getareachar_skillunit(struct block_list *bl, struct skill_unit *unit, enum send_target target, uint8 flag) {
|
||||||
int header = 0, unit_id = 0, pos = 0, fd = 0, len = -1;
|
int header = 0, unit_id = 0, pos = 0, fd = 0, len = -1;
|
||||||
unsigned char buf[128];
|
unsigned char buf[128];
|
||||||
|
|
||||||
@ -4558,15 +4558,31 @@ void clif_getareachar_skillunit(struct block_list *bl, struct skill_unit *unit,
|
|||||||
if (unit->group->state.guildaura)
|
if (unit->group->state.guildaura)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (battle_config.traps_setting&1 && skill_get_inf2(unit->group->skill_id)&INF2_TRAP)
|
if (unit->group->state.song_dance&0x1 && unit->val2&UF_ENSEMBLE)
|
||||||
unit_id = UNT_DUMMYSKILL; //Use invisible unit id for traps.
|
|
||||||
else if (unit->group->state.song_dance&0x1 && unit->val2&UF_ENSEMBLE)
|
|
||||||
unit_id = unit->val2&UF_SONG ? UNT_DISSONANCE : UNT_UGLYDANCE;
|
unit_id = unit->val2&UF_SONG ? UNT_DISSONANCE : UNT_UGLYDANCE;
|
||||||
else if (skill_get_unit_flag(unit->group->skill_id) & UF_RANGEDSINGLEUNIT && !(unit->val2 & UF_RANGEDSINGLEUNIT))
|
else if (skill_get_unit_flag(unit->group->skill_id) & UF_RANGEDSINGLEUNIT && !(unit->val2 & UF_RANGEDSINGLEUNIT))
|
||||||
unit_id = UNT_DUMMYSKILL; //Use invisible unit id for other case of rangedsingle unit
|
unit_id = UNT_DUMMYSKILL; // Use invisible unit id for other case of rangedsingle unit
|
||||||
else
|
else
|
||||||
unit_id = unit->group->unit_id;
|
unit_id = unit->group->unit_id;
|
||||||
|
|
||||||
|
if (flag && battle_config.traps_setting&1) {
|
||||||
|
switch(unit->group->skill_id) {
|
||||||
|
case HT_ANKLESNARE:
|
||||||
|
if (!map_flag_vs(((TBL_PC*)bl)->bl.m))
|
||||||
|
break;
|
||||||
|
case HT_SKIDTRAP:
|
||||||
|
case MA_SKIDTRAP:
|
||||||
|
case HT_SHOCKWAVE:
|
||||||
|
case HT_SANDMAN:
|
||||||
|
case MA_SANDMAN:
|
||||||
|
case HT_FLASHER:
|
||||||
|
case HT_FREEZINGTRAP:
|
||||||
|
case MA_FREEZINGTRAP:
|
||||||
|
unit_id = UNT_DUMMYSKILL; // Use invisible unit id for Hunter's traps
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#if PACKETVER >= 3
|
#if PACKETVER >= 3
|
||||||
if (unit_id == UNT_GRAFFITI) { // Graffiti [Valaris]
|
if (unit_id == UNT_GRAFFITI) { // Graffiti [Valaris]
|
||||||
clif_graffiti(bl, unit, target);
|
clif_graffiti(bl, unit, target);
|
||||||
@ -4690,7 +4706,7 @@ static int clif_getareachar(struct block_list* bl,va_list ap)
|
|||||||
clif_getareachar_item(sd,(struct flooritem_data*) bl);
|
clif_getareachar_item(sd,(struct flooritem_data*) bl);
|
||||||
break;
|
break;
|
||||||
case BL_SKILL:
|
case BL_SKILL:
|
||||||
clif_getareachar_skillunit(&sd->bl, (TBL_SKILL*)bl, SELF);
|
clif_getareachar_skillunit(&sd->bl, (TBL_SKILL*)bl, SELF, 1);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if(&sd->bl == bl)
|
if(&sd->bl == bl)
|
||||||
@ -4778,7 +4794,7 @@ int clif_insight(struct block_list *bl,va_list ap)
|
|||||||
clif_getareachar_item(tsd,(struct flooritem_data*)bl);
|
clif_getareachar_item(tsd,(struct flooritem_data*)bl);
|
||||||
break;
|
break;
|
||||||
case BL_SKILL:
|
case BL_SKILL:
|
||||||
clif_getareachar_skillunit(&tsd->bl, (TBL_SKILL*)bl, SELF);
|
clif_getareachar_skillunit(&tsd->bl, (TBL_SKILL*)bl, SELF, 1);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
clif_getareachar_unit(tsd,bl);
|
clif_getareachar_unit(tsd,bl);
|
||||||
|
@ -553,7 +553,7 @@ void clif_cooking_list(struct map_session_data *sd, int trigger, uint16 skill_id
|
|||||||
|
|
||||||
void clif_produceeffect(struct map_session_data* sd,int flag, unsigned short nameid);
|
void clif_produceeffect(struct map_session_data* sd,int flag, unsigned short nameid);
|
||||||
|
|
||||||
void clif_getareachar_skillunit(struct block_list *bl, struct skill_unit *unit, enum send_target target);
|
void clif_getareachar_skillunit(struct block_list *bl, struct skill_unit *unit, enum send_target target, uint8 flag);
|
||||||
void clif_skill_delunit(struct skill_unit *unit);
|
void clif_skill_delunit(struct skill_unit *unit);
|
||||||
void clif_skillunit_update(struct block_list* bl);
|
void clif_skillunit_update(struct block_list* bl);
|
||||||
|
|
||||||
|
@ -4017,7 +4017,7 @@ static int skill_reveal_trap(struct block_list *bl, va_list ap)
|
|||||||
{ //Reveal trap.
|
{ //Reveal trap.
|
||||||
//Change look is not good enough, the client ignores it as an actual trap still. [Skotlex]
|
//Change look is not good enough, the client ignores it as an actual trap still. [Skotlex]
|
||||||
//clif_changetraplook(bl, su->group->unit_id);
|
//clif_changetraplook(bl, su->group->unit_id);
|
||||||
clif_getareachar_skillunit(&su->bl, su, AREA);
|
clif_getareachar_skillunit(&su->bl, su, AREA, 0);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -10954,8 +10954,8 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui
|
|||||||
src->m, x-i, y-i, x+i,y+i,BL_CHAR,
|
src->m, x-i, y-i, x+i,y+i,BL_CHAR,
|
||||||
src,NULL,SC_SIGHT,tick);
|
src,NULL,SC_SIGHT,tick);
|
||||||
if(battle_config.traps_setting&1)
|
if(battle_config.traps_setting&1)
|
||||||
map_foreachinarea( skill_reveal_trap,
|
map_foreachinarea(skill_reveal_trap, src->m, x-i, y-i, x+i, y+i, BL_SKILL);
|
||||||
src->m, x-i, y-i, x+i,y+i,BL_SKILL);
|
break;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SR_RIDEINLIGHTNING:
|
case SR_RIDEINLIGHTNING:
|
||||||
@ -11818,7 +11818,7 @@ static int skill_dance_overlap_sub(struct block_list* bl, va_list ap)
|
|||||||
else //Remove dissonance
|
else //Remove dissonance
|
||||||
target->val2 &= ~UF_ENSEMBLE;
|
target->val2 &= ~UF_ENSEMBLE;
|
||||||
|
|
||||||
clif_getareachar_skillunit(&target->bl, target, AREA); //Update look of affected cell.
|
clif_getareachar_skillunit(&target->bl, target, AREA, 0); //Update look of affected cell.
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -16997,7 +16997,7 @@ struct skill_unit *skill_initunit(struct skill_unit_group *group, int idx, int x
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
clif_getareachar_skillunit(&unit->bl, unit, AREA);
|
clif_getareachar_skillunit(&unit->bl, unit, AREA, 0);
|
||||||
return unit;
|
return unit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -17840,7 +17840,7 @@ void skill_unit_move_unit(struct block_list *bl, int dx, int dy) {
|
|||||||
|
|
||||||
map_moveblock(bl, dx, dy, tick);
|
map_moveblock(bl, dx, dy, tick);
|
||||||
map_foreachincell(skill_unit_effect,bl->m,bl->x,bl->y,su->group->bl_flag,bl,tick,1);
|
map_foreachincell(skill_unit_effect,bl->m,bl->x,bl->y,su->group->bl_flag,bl,tick,1);
|
||||||
clif_getareachar_skillunit(bl, su, AREA);
|
clif_getareachar_skillunit(bl, su, AREA, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -17934,7 +17934,7 @@ void skill_unit_move_unit_group(struct skill_unit_group *group, int16 m, int16 d
|
|||||||
if (!(m_flag[i]&0x2)) { //We only moved the cell in 0-1
|
if (!(m_flag[i]&0x2)) { //We only moved the cell in 0-1
|
||||||
if (group->state.song_dance&0x1) //Check for dissonance effect.
|
if (group->state.song_dance&0x1) //Check for dissonance effect.
|
||||||
skill_dance_overlap(unit1, 1);
|
skill_dance_overlap(unit1, 1);
|
||||||
clif_getareachar_skillunit(&unit1->bl, unit1, AREA);
|
clif_getareachar_skillunit(&unit1->bl, unit1, AREA, 0);
|
||||||
map_foreachincell(skill_unit_effect,unit1->bl.m,unit1->bl.x,unit1->bl.y,group->bl_flag,&unit1->bl,tick,1);
|
map_foreachincell(skill_unit_effect,unit1->bl.m,unit1->bl.x,unit1->bl.y,group->bl_flag,&unit1->bl,tick,1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user