//include'lerin olduğu bölüme ekle; #ifdef ENABLE_DICE_SYSTEM #include "party.h" #endif //arat; ALUA(game_drop_item_with_ownership) //fonksiyondan sonra ekle; #ifdef ENABLE_DICE_SYSTEM ALUA(game_drop_item_with_ownership_and_dice) { LPITEM item = NULL; switch (lua_gettop(L)) { case 1: item = ITEM_MANAGER::instance().CreateItem((DWORD)lua_tonumber(L, 1)); break; case 2: case 3: item = ITEM_MANAGER::instance().CreateItem((DWORD)lua_tonumber(L, 1), (int)lua_tonumber(L, 2)); break; default: return 0; } if (item == NULL) { return 0; } LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); if (ch->GetParty()) { FPartyDropDiceRoll f(item, ch); f.Process(NULL); } if (lua_isnumber(L, 3)) { int sec = (int)lua_tonumber(L, 3); if (sec <= 0) { item->SetOwnership(ch); } else { item->SetOwnership(ch, sec); } } else item->SetOwnership(ch); PIXEL_POSITION pos; pos.x = ch->GetX() + number(-200, 200); pos.y = ch->GetY() + number(-200, 200); item->AddToGround(ch->GetMapIndex(), pos); item->StartDestroyEvent(); return 0; } #endif //tekrar arat; { "drop_item_with_ownership", game_drop_item_with_ownership }, //altına ekle; #ifdef ENABLE_DICE_SYSTEM { "drop_item_with_ownership_and_dice", game_drop_item_with_ownership_and_dice }, #endif