Tipologie server:
*Resursă folosită: N/A
*ServerFiles utilizat: N/A
*Syserr: N/A
Poză: N/A
*Detalii suplimentare: De curand am adaugat event Tanaka, totul merge bine..doar ca tanaka cu codul 5001 dropeaza foarte mult yang pe jos, ceea ce provoaca lag...Am incercat sa vad daca pot face ceva din navicat, nu nu pot face nimic de acolo, am vazut ca e din sursa...am modificat pe acolo dar doar am sters valoare yang, nu dropul....Las aici char_battle.cpp ..Daca are idee cineva de unde sa scot drop de tot...
Cod: Selectaţi tot
if (DAMAGE_TYPE_MAGIC == type)
{
dam = (int)((float)dam * (100 + (pAttacker->GetPoint(POINT_MAGIC_ATT_BONUS_PER) + pAttacker->GetPoint(POINT_MELEE_MAGIC_ATT_BONUS_PER))) / 100.f + 0.5f);
}
if (GetRaceNum() == 5001)
{
bool bDropMoney = false;
int iPercent = 0; // @fixme136
if (GetMaxHP() >= 0)
iPercent = (GetHP() * 100) / GetMaxHP();
if (iPercent <= 10 && GetMaxSP() < 5)
{
SetMaxSP(5);
bDropMoney = true;
}
else if (iPercent <= 20 && GetMaxSP() < 4)
{
SetMaxSP(4);
bDropMoney = true;
}
else if (iPercent <= 40 && GetMaxSP() < 3)
{
SetMaxSP(3);
bDropMoney = true;
}
else if (iPercent <= 60 && GetMaxSP() < 2)
{
SetMaxSP(2);
bDropMoney = true;
}
else if (iPercent <= 80 && GetMaxSP() < 1)
{
SetMaxSP(1);
bDropMoney = true;
}
if (bDropMoney)
{
DWORD dwGold = 1000;
int iSplitCount = number(10, 13);
sys_log(0, "WAEGU DropGoldOnHit %d times", GetMaxSP());
for (int i = 1; i <= iSplitCount; ++i)
{
PIXEL_POSITION pos;
LPITEM item;
if ((item = ITEM_MANAGER::instance().CreateItem(1, dwGold / iSplitCount)))
{
if (i != 0)
{
pos.x = (number(-14, 14) + number(-14, 14)) * 20;
pos.y = (number(-14, 14) + number(-14, 14)) * 20;
pos.x += GetX();
pos.y += GetY();
}
item->AddToGround(GetMapIndex(), pos);
item->StartDestroyEvent();
}
}
}
}Cod: Selectaţi tot
void CHARACTER::Reward(bool bItemDrop)
{
if (GetRaceNum() == 5001) // ¿Ö±¸´Â µ·À» ¹«Á¶°Ç µå·Ó
{
PIXEL_POSITION pos;
if (!SECTREE_MANAGER::instance().GetMovablePosition(GetMapIndex(), GetX(), GetY(), pos))
return;
LPITEM item;
int iGold = number(GetMobTable().dwGoldMin, GetMobTable().dwGoldMax);
iGold = iGold * CHARACTER_MANAGER::instance().GetMobGoldAmountRate(NULL) / 100;
iGold *= GetGoldMultipler();
int iSplitCount = number(25, 35);
sys_log(0, "WAEGU Dead gold %d split %d", iGold, iSplitCount);
for (int i = 1; i <= iSplitCount; ++i)
{
if ((item = ITEM_MANAGER::instance().CreateItem(1, iGold / iSplitCount)))
{
if (i != 0)
{
pos.x = number(-7, 7) * 20;
pos.y = number(-7, 7) * 20;
pos.x += GetX();
pos.y += GetY();
}
item->AddToGround(GetMapIndex(), pos);
item->StartDestroyEvent();
}
}
return;
}Cod: Selectaţi tot
if (bDropMoney)
{
DWORD dwGold = 1000;
int iSplitCount = number(10, 13);
sys_log(0, "WAEGU DropGoldOnHit %d times", GetMaxSP());
for (int i = 1; i <= iSplitCount; ++i)
{
PIXEL_POSITION pos;
LPITEM item;
if ((item = ITEM_MANAGER::instance().CreateItem(1, dwGold / iSplitCount)))
{
if (i != 0)
{
pos.x = (number(-14, 14) + number(-14, 14)) * 20;
pos.y = (number(-14, 14) + number(-14, 14)) * 20;
pos.x += GetX();
pos.y += GetY();
}
item->AddToGround(GetMapIndex(), pos);
item->StartDestroyEvent();
}
}
}
}

