if (map->list[sd->bl.m].flag.gvg)
{
int consumeitem = tsd ? pc->search_inventory(tsd, ITEMID_WOECRYSTALFRAGMENT) : 0;
if (consumeitem != INDEX_NOT_FOUND)
{
if ( tsd ) pc->delitem(tsd, consumeitem, 1, 0, DELITEM_SKILLUSE, LOG_TYPE_CONSUME);
dmg.damage = dmg.damage2 = 0;
dmg.dmg_lv = ATK_MISS;
sc->data[SC_SOULLINK]->val3 = skill_id;
sc->data[SC_SOULLINK]->val4 = dsrc->id;
}
}
else if (map->list[sd->bl.m].flag.battleground)
{
int consumeitem = tsd ? pc->search_inventory(tsd, ITEMID_BGCRYSTALFRAGMENT) : 0;
if (consumeitem != INDEX_NOT_FOUND)
{
if ( tsd ) pc->delitem(tsd, consumeitem, 1, 0, DELITEM_SKILLUSE, LOG_TYPE_CONSUME);
dmg.damage = dmg.damage2 = 0;
dmg.dmg_lv = ATK_MISS;
sc->data[SC_SOULLINK]->val3 = skill_id;
sc->data[SC_SOULLINK]->val4 = dsrc->id;
}
}