
Aici am modificiat in char_item .
70020 fiind vin flori de piersic ( cel de după roua albă din poza de sus)





Cod: Selectaţi tot
case USE_POTION_NODELAY:
Cod: Selectaţi tot
case USE_POTION_NODELAY:
{
if (CArenaManager::instance().IsArenaMap(GetMapIndex()) == true)
{
if (quest::CQuestManager::instance().GetEventFlag("arena_potion_limit") > 0)
{
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("대련장에서 사용하실 수 없습니다."));
return false;
}
switch (item->GetVnum())
{
case 70020 :
case 71018 :
case 71019 :
case 71020 :
if (quest::CQuestManager::instance().GetEventFlag("arena_potion_limit_count") < 10000)
{
if (m_nPotionLimit <= 0)
{
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("사용 제한량을 초과하였습니다."));
return false;
}
}
break;
default :
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("대련장에서 사용하실 수 없습니다."));
return false;
}
}
bool used = false;
if (item->GetValue(0) != 0) // HP 절대값 회복
{
if (GetHP() < GetMaxHP())
{
PointChange(POINT_HP, item->GetValue(0) * (100 + GetPoint(POINT_POTION_BONUS)) / 100);
EffectPacket(SE_HPUP_RED);
used = TRUE;
}
}
if (item->GetValue(1) != 0) // SP 절대값 회복
{
if (GetSP() < GetMaxSP())
{
PointChange(POINT_SP, item->GetValue(1) * (100 + GetPoint(POINT_POTION_BONUS)) / 100);
EffectPacket(SE_SPUP_BLUE);
used = TRUE;
}
}
if (item->GetValue(3) != 0) // HP % 회복
{
if (GetHP() < GetMaxHP())
{
PointChange(POINT_HP, item->GetValue(3) * GetMaxHP() / 100);
EffectPacket(SE_HPUP_RED);
used = TRUE;
}
}
if (item->GetValue(4) != 0) // SP % 회복
{
if (GetSP() < GetMaxSP())
{
PointChange(POINT_SP, item->GetValue(4) * GetMaxSP() / 100);
EffectPacket(SE_SPUP_BLUE);
used = TRUE;
}
}
if (used)
{
if (item->GetVnum() == 50085 || item->GetVnum() == 50086)
{
if (test_server)
ChatPacket(CHAT_TYPE_INFO, LC_TEXT("월병 또는 종자 를 사용하였습니다"));
SetUseSeedOrMoonBottleTime();
}
if (GetDungeon())
GetDungeon()->UsePotion(this);
if (GetWarMap())
GetWarMap()->UsePotion(this, item);
m_nPotionLimit--;
//RESTRICT_USE_SEED_OR_MOONBOTTLE
item->SetCount(item->GetCount() - 1); // daca pui 0 e permanent.
//END_RESTRICT_USE_SEED_OR_MOONBOTTLE
}
}
break;
Utilizatori ce ce navighează pe acest forum: Bing [Bot] și 168 vizitatori