- Mesaj
- 426
- Çözümler
- 23
- Beğeni
- 224
- Puan
- 744
- Ticaret Puanı
- 0
Slotlardan bosslardan ve metinlerden düşen yanglar yere düşmesin direkt envantere gelsin isteyenler içindir. Kısa bir değişikliktir .cpp dosyasını aşağıya yükledim.
CommonDefines.h:
//UYGUN YERE EKLE
#define DISABLE_YANG_BOMB // Boss & Slot direkt yang envanter gelsin.
char_battle.cpp:
// BUL
// NOTE: 돈 폭탄은 제 3의 손 처리를 하지 않음
if ((item = ITEM_MANAGER::instance().CreateItem(1, iGold)))
{
pos.x = GetX() + ((number(-14, 14) + number(-14, 14)) * 23);
pos.y = GetY() + ((number(-14, 14) + number(-14, 14)) * 23);
item->AddToGround(GetMapIndex(), pos);
item->StartDestroyEvent();
iTotalGold += iGold; // Total gold
}
}
}
// 1% 확률로 돈을 10개 떨어 뜨린다. (10배 드롭임)
else if (1 == number(1, iGold10DropPct))
{
//
// 돈 폭탄식 드롭
//
for (int i = 0; i < 10; ++i)
{
int iGold = number(GetMobTable().dwGoldMin, GetMobTable().dwGoldMax);
iGold = iGold * CHARACTER_MANAGER::instance().GetMobGoldAmountRate(pkAttacker) / 100;
iGold *= iGoldMultipler;
if (iGold == 0)
{
continue;
}
// NOTE: 돈 폭탄은 제 3의 손 처리를 하지 않음
if ((item = ITEM_MANAGER::instance().CreateItem(1, iGold)))
{
pos.x = GetX() + (number(-7, 7) * 20);
pos.y = GetY() + (number(-7, 7) * 20);
item->AddToGround(GetMapIndex(), pos);
item->StartDestroyEvent();
iTotalGold += iGold; // Total gold
}
}
}
// BU KISMI DEĞİŞTİR
int iGold10DropPct = 100;
iGold10DropPct = (iGold10DropPct * 100) / (100 + CPrivManager::instance().GetPriv(pkAttacker, PRIV_GOLD10_DROP));
// MOB_RANK가 BOSS보다 높으면 무조건 돈폭탄
if (GetMobRank() >= MOB_RANK_BOSS && !IsStone() && GetMobTable().dwGoldMax != 0)
{
if (1 == number(1, iGold10DropPct))
iGoldMultipler *= 10; // 1% 확률로 돈 10배
int iSplitCount = number(25, 35);
for (int i = 0; i < iSplitCount; ++i)
{
int iGold = number(GetMobTable().dwGoldMin, GetMobTable().dwGoldMax) / iSplitCount;
if (test_server)
sys_log(0, "iGold %d", iGold);
iGold = iGold * CHARACTER_MANAGER::instance().GetMobGoldAmountRate(pkAttacker) / 100;
iGold *= iGoldMultipler;
if (iGold == 0)
{
continue ;
}
if (test_server)
{
sys_log(0, "Drop Moeny MobGoldAmountRate %d %d", CHARACTER_MANAGER::instance().GetMobGoldAmountRate(pkAttacker), iGoldMultipler);
sys_log(0, "Drop Money gold %d GoldMin %d GoldMax %d", iGold, GetMobTable().dwGoldMax, GetMobTable().dwGoldMax);
}
#ifdef DISABLE_YANG_BOMB
pkAttacker->GiveGold(iGold / iSplitCount); // Altın do?rudan oyuncuya verilecek
iTotalGold += iGold;
#else
// Bu kısmı kaldırdık, cunku artık altın yere du?meyecek.
#endif
}
}
#ifdef DISABLE_YANG_BOMB
else if (1 == number(1, iGold10DropPct))
{
for (int i = 0; i < 10; ++i)
{
int iGold = number(GetMobTable().dwGoldMin, GetMobTable().dwGoldMax);
iGold = iGold * CHARACTER_MANAGER::instance().GetMobGoldAmountRate(pkAttacker) / 100;
iGold *= iGoldMultipler;
if (iGold == 0)
{
continue;
}
// Altın do?rudan oyuncuya verilecek
pkAttacker->GiveGold(iGold);
iTotalGold += iGold;
}
}
#endif
else
{
//
// 일반적인 방식의 돈 드롭
//
int iGold = number(GetMobTable().dwGoldMin, GetMobTable().dwGoldMax);
iGold = iGold * CHARACTER_MANAGER::instance().GetMobGoldAmountRate(pkAttacker) / 100;
iGold *= iGoldMultipler;
int iSplitCount;
if (iGold >= 3 && !LC_IsYMIR())
iSplitCount = number(1, 3);
else if (GetMobRank() >= MOB_RANK_BOSS)
{
iSplitCount = number(3, 10);
if ((iGold / iSplitCount) == 0)
iSplitCount = 1;
}
else
iSplitCount = 1;
if (iGold != 0)
{
iTotalGold += iGold; // Toplam altın
for (int i = 0; i < iSplitCount; ++i)
{
if (isAutoLoot)
{
pkAttacker->GiveGold(iGold / iSplitCount); // Altın do?rudan oyuncuya verilecek
}
else
{
// Yer du?urme kısmı kaldırıldı, sadece do?rudan oyuncuya verilecek
pkAttacker->GiveGold(iGold / iSplitCount);
}
}
}
}
DBManager::instance().SendMoneyLog(MONEY_LOG_MONSTER, GetRaceNum(), iTotalGold);
}
// SON HALİ ŞÖYLE OLACAK :
int iGold10DropPct = 100;
iGold10DropPct = (iGold10DropPct * 100) / (100 + CPrivManager::instance().GetPriv(pkAttacker, PRIV_GOLD10_DROP));
// MOB_RANK가 BOSS보다 높으면 무조건 돈폭탄
if (GetMobRank() >= MOB_RANK_BOSS && !IsStone() && GetMobTable().dwGoldMax != 0)
{
if (1 == number(1, iGold10DropPct))
iGoldMultipler *= 10; // 1% 확률로 돈 10배
int iSplitCount = number(25, 35);
for (int i = 0; i < iSplitCount; ++i)
{
int iGold = number(GetMobTable().dwGoldMin, GetMobTable().dwGoldMax) / iSplitCount;
if (test_server)
sys_log(0, "iGold %d", iGold);
iGold = iGold * CHARACTER_MANAGER::instance().GetMobGoldAmountRate(pkAttacker) / 100;
iGold *= iGoldMultipler;
if (iGold == 0)
{
continue ;
}
if (test_server)
{
sys_log(0, "Drop Moeny MobGoldAmountRate %d %d", CHARACTER_MANAGER::instance().GetMobGoldAmountRate(pkAttacker), iGoldMultipler);
sys_log(0, "Drop Money gold %d GoldMin %d GoldMax %d", iGold, GetMobTable().dwGoldMax, GetMobTable().dwGoldMax);
}
#ifdef DISABLE_YANG_BOMB
pkAttacker->GiveGold(iGold / iSplitCount); // Altın do?rudan oyuncuya verilecek
iTotalGold += iGold;
#else
// Bu kısmı kaldırdık, cunku artık altın yere du?meyecek.
#endif
}
}
#ifdef DISABLE_YANG_BOMB
else if (1 == number(1, iGold10DropPct))
{
for (int i = 0; i < 10; ++i)
{
int iGold = number(GetMobTable().dwGoldMin, GetMobTable().dwGoldMax);
iGold = iGold * CHARACTER_MANAGER::instance().GetMobGoldAmountRate(pkAttacker) / 100;
iGold *= iGoldMultipler;
if (iGold == 0)
{
continue;
}
// Altın do?rudan oyuncuya verilecek
pkAttacker->GiveGold(iGold);
iTotalGold += iGold;
}
}
#endif
else
{
//
// 일반적인 방식의 돈 드롭
//
int iGold = number(GetMobTable().dwGoldMin, GetMobTable().dwGoldMax);
iGold = iGold * CHARACTER_MANAGER::instance().GetMobGoldAmountRate(pkAttacker) / 100;
iGold *= iGoldMultipler;
int iSplitCount;
if (iGold >= 3 && !LC_IsYMIR())
iSplitCount = number(1, 3);
else if (GetMobRank() >= MOB_RANK_BOSS)
{
iSplitCount = number(3, 10);
if ((iGold / iSplitCount) == 0)
iSplitCount = 1;
}
else
iSplitCount = 1;
if (iGold != 0)
{
iTotalGold += iGold; // Toplam altın
for (int i = 0; i < iSplitCount; ++i)
{
if (isAutoLoot)
{
pkAttacker->GiveGold(iGold / iSplitCount); // Altın do?rudan oyuncuya verilecek
}
else
{
// Yer du?urme kısmı kaldırıldı, sadece do?rudan oyuncuya verilecek
pkAttacker->GiveGold(iGold / iSplitCount);
}
}
}
}
DBManager::instance().SendMoneyLog(MONEY_LOG_MONSTER, GetRaceNum(), iTotalGold);
}