Permalink
Browse files

Fixed Ice Wall units to match their official behavior (#3935)

  • Loading branch information...
Daegaladh committed Feb 9, 2019
1 parent fc7e46e commit 35611e78e1e3387155cfbc632613788adb65676b
Showing with 10 additions and 20 deletions.
  1. +0 −2 db/pre-re/skill_cast_db.txt
  2. +1 −1 db/pre-re/skill_unit_db.txt
  3. +0 −2 db/re/skill_cast_db.txt
  4. +1 −1 db/re/skill_unit_db.txt
  5. +8 −14 src/map/skill.cpp
@@ -166,8 +166,6 @@
85,15000:14500:14000:13500:13000:12500:12000:11500:11000:10500,5000,0,4000,30000,0
//-- WZ_WATERBALL
86,1000:2000:3000:4000:5000:6000:7000:8000:9000:10000,0,0,10000,0,0
//-- WZ_ICEWALL
87,0,0,0,5000:10000:15000:20000:25000:30000:35000:40000:45000:50000,0,0
//-- WZ_FROSTNOVA
88,6000:6000:5500:5500:5000:5000:4500:4500:4000:4000,1000,0,0,1500:3000:4500:6000:7500:9000:10500:12000:13500:15000,0
//-- WZ_STORMGUST
@@ -43,7 +43,7 @@
83,0x86, , 0, 3,1000,enemy, 0x010 //WZ_METEOR
85,0x86, , 5:5:5:5:5:5:5:5:5:5:7, 1,1250,enemy,0x018 //WZ_VERMILION
86,0x86, , 0:1:1:2:2:2:2:2:2:2, 0,-1,noone, 0x010 //WZ_WATERBALL
87,0x8d, , -1, 0, -1,all, 0x9010 //WZ_ICEWALL
87,0x8d, , -1, 0,1000,all, 0x9010 //WZ_ICEWALL
89,0x86, , 4, 1, 450,enemy, 0x018 //WZ_STORMGUST
91,0x86, , 2, 0,1000,enemy, 0x010 //WZ_HEAVENDRIVE
92,0x8e, , 2, 0, -1,enemy, 0x8010 //WZ_QUAGMIRE
@@ -167,8 +167,6 @@
85,9600:9280:8960:8640:8320:8000:7680:7360:7040:6720,5000,0,4000,20000,0,2400:2320:2240:2160:2080:2000:1920:1840:1760:1680
//-- WZ_WATERBALL
86,640:1280:1920:2560:3200,0,0,10000,0,0,160:320:480:640:800
//-- WZ_ICEWALL
87,0,0,0,5000:10000:15000:20000:25000:30000:35000:40000:45000:50000,0,0,0
//-- WZ_FROSTNOVA
88,640:640:576:576:512:512:448:448:384:384,200,0,0,4000:5500:7000:8500:10000:11500:13000:14500:16000:17500,0,160:160:144:144:128:128:112:112:96:96
//-- WZ_STORMGUST
@@ -43,7 +43,7 @@
83,0x86, , 0, 3,1000,enemy, 0x010 //WZ_METEOR
85,0x86, , 5:5:5:5:5:5:5:5:5:5:7, 1,1250,enemy,0x018 //WZ_VERMILION
86,0x86, , 0:1:1:2:2:2:2:2:2:2, 0,-1,noone, 0x010 //WZ_WATERBALL
87,0x8d, , -1, 0, -1,all, 0x9010 //WZ_ICEWALL
87,0x8d, , -1, 0,1000,all, 0x9010 //WZ_ICEWALL
89,0x86, , 4, 1, 450,enemy, 0x018 //WZ_STORMGUST
91,0x86, , 2, 0,1000,enemy, 0x010 //WZ_HEAVENDRIVE
92,0x8e, , 2, 0, -1,enemy, 0x8010 //WZ_QUAGMIRE
@@ -13261,7 +13261,7 @@ struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 skill_
unit_val2 = group->val2;
break;
case WZ_ICEWALL:
unit_val1 = (skill_lv <= 1) ? 500 : 200 + 200*skill_lv;
unit_val1 = 200 + 200*skill_lv;
unit_val2 = map_getcell(src->m, ux, uy, CELL_GETTYPE);
break;
case WZ_WATERBALL:
@@ -13604,13 +13604,6 @@ static int skill_unit_onplace(struct skill_unit *unit, struct block_list *bl, t_
}
break;

// officially, icewall has no problems existing on occupied cells [ultramage]
// case UNT_ICEWALL: //Destroy the cell. [Skotlex]
// unit->val1 = 0;
// if(unit->limit + sg->tick > tick + 700)
// unit->limit = DIFF_TICK(tick+700,sg->tick);
// break;

case UNT_MOONLIT:
//Knockback out of area if affected char isn't in Moonlit effect
if (sc && sc->data[SC_DANCING] && (sc->data[SC_DANCING]->val1&0xFFFF) == CG_MOONLIT)
@@ -18526,6 +18519,13 @@ static int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap)
if( !group->state.guildaura && (DIFF_TICK(tick,group->tick) >= group->limit || DIFF_TICK(tick,group->tick) >= unit->limit) )
{// skill unit expired (inlined from skill_unit_onlimit())
switch( group->unit_id ) {
case UNT_ICEWALL:
unit->val1 -= 50; // icewall loses 50 hp every second
group->limit = DIFF_TICK(tick + group->interval,group->tick);
unit->limit = DIFF_TICK(tick + group->interval,group->tick);
if( unit->val1 <= 0 )
skill_delunit(unit);
break;
case UNT_BLASTMINE:
#ifdef RENEWAL
case UNT_CLAYMORETRAP:
@@ -18669,12 +18669,6 @@ static int skill_unit_timer_sub(DBKey key, DBData *data, va_list ap)
}
} else {// skill unit is still active
switch( group->unit_id ) {
case UNT_ICEWALL:
// icewall loses 50 hp every second
unit->val1 -= SKILLUNITTIMER_INTERVAL/20; // trap's hp
if( unit->val1 <= 0 && unit->limit + group->tick > tick + 700 )
unit->limit = DIFF_TICK(tick+700,group->tick);
break;
case UNT_BLASTMINE:
case UNT_SKIDTRAP:
case UNT_LANDMINE:

0 comments on commit 35611e7

Please sign in to comment.