• Content Count

  • Joined

  • Last visited

  • Days Won


Yiv last won the day on April 11 2018

Yiv had the most liked content!

Community Reputation

93 Excellent


About Yiv

  • Rank
  • Birthday March 21

Profile Information

  • Gender
  • Location

Recent Profile Visitors

2,333 profile views
  1. Kori


    1. Yiv
    2. Kori


      Hehe melde dich mal wenn du zeit hast 


  2. As a quest function this release is not really necessary. You can do this using the quest functions provided by the core by default. function checkItem(index, count) local partyMemberPids = table.pack(party.get_member_pids()) local invalid = false for _, pid in ipairs(partyMemberPids) do q.begin_other_pc_block(pid) if pc.count_item(index) < count then invalid = true end q.end_other_pc_block() if invalid then break end end return not invalid end function removeItem(index, count) local partyMemberPids = table.pack(party.get_member_pids()) for _, pid in ipairs(partyMemberPids) do q.begin_other_pc_block(pid) pc.remove_item(index, count) q.end_other_pc_block() end end By the way: The code optimization during compile time should know wether it's needed that the value returned by the operator is needed or not. If not the optimization should be aware of that and optimize the code in a way that both ways behave the same and therefore have no performance difference. Otherwise if it's needed, you're right of course and the pre-increment operator is better talking of performance but if you need it you won't have another way anyway and this does not matter. Regards
  3. Just try it. It may work without any changes. If not, then report it here and we'll see. Regards
  4. Both solutions should work fine. I think the solution posted by Socialized using the returned iterator by the erase method should be better. I at least would change my code posted above to this: void CQuestManager::CancelServerTimers(DWORD arg) { for (auto it = m_mapServerTimer.begin(); it != m_mapServerTimer.end(); /**/) { if (it->first.second != arg) { ++it; } else { auto event = it->second; event_cancel(&event); it = m_mapServerTimer.erase(it); } } } Regards
  5. Try to replace the CQuestManager::CancelServerTimers method in questmanager.cpp with this one: void CQuestManager::CancelServerTimers(DWORD arg) { for (auto it = m_mapServerTimer.begin(); it != m_mapServerTimer.end(); /**/) { if (it->first.second != arg) { ++it; } else { auto event = it->second; event_cancel(&event); m_mapServerTimer.erase(it++); } } } Regards
  6. Yiv

    Client-Interface illumina

    At least add the credits and license. Regards
  7. Yiv

    Anti-Switch in C++ ?

    He said that, because you say, it's simple but if you say that, you should be able to do that
  8. Yiv

    Offering section

    Hello LeNnT, I told you, that I wrote to ChuckNorris, and he deactivated your topic until the conflict of stealing parts of my code and selling as yours is solved. You can place your statement for this in a private message to me and Chuck. By the way, the system we're talking about is now released on elitepvpers by me: http://www.elitepvpers.com/forum/metin2-pserver-guides-strategies/3994360-rls-markierung-neu-gedroppter-items.html#post33936069 Regards
  9. ​Why did you add the new map LevelByVnum and not just implemented the CPythonNonPlayer::GetMobLevel(DWORD dwVnum) like this: BYTE CPythonNonPlayer::GetMobLevel(DWORD dwVnum) { const CPythonNonPlayer::TMobTable * c_pTable = GetTable(dwVnum); if (!c_pTable) return 0; return c_pTable->bLevel; }Regards
  10. There's no quest function for that, you'd have to make your own, something like this: // Syntax: npc.move(map_index, local x, local y) int npc_move(lua_State* L) { if (!lua_isnumber(L, 1) || !lua_isnumber(L, 2) || !lua_isnumber(L, 3)) { lua_pushboolean(L, FALSE); return 1; } LPCHARACTER pkNPC = CQuestManager::instance().GetCurrentNPCCharacterPtr(); if (!pkNPC) { lua_pushboolean(L, FALSE); return 1; } long lMapIndex = lua_tonumber(L, 1); long lX = lua_tonumber(L, 2); long lY = lua_tonumber(L, 3); LPSECTREE_MAP pkSectreeMap = SECTREE_MANAGER::instance().GetMap(lMapIndex); if (!pkSectreeMap) return 0; if (pkNPC->Goto(pkSectreeMap->m_setting.iBaseX + lX, pkSectreeMap->m_setting.iBaseY + lY)) { pkNPC->SendMovePacket(FUNC_WAIT, 0, 0, 0, 0); lua_pushboolean(L, TRUE); } else { lua_pushboolean(L, FALSE); } return 1; } IT'S UNTESTED! Regards
  11. Yiv

    Best Payment Method for Metin2

    What's about using PaymentWall in Germany? You have problems because of taxes? Can you register as a private person without any VAT-no.?
  12. Dear community, since some days we're noticing that our database core is crashing from time to time. The last relevant messages in syslog are these: Apr 8 11:59:33.728741 :: ITEM_AWARD: load id 0 login vnum 1966080000 count 6553600 socket 0 Apr 8 11:59:33.728788 :: SIGNAL: SIGSEGV Somebody knows where the problem is? Btw.: I checked player.item_award but there's no item with such a vnum... Regards
  13. Yiv

    [Animation Pipeline]Metin2 Rig for animation

    Wow, I think it's very usefull! Great work, keep it going. Regards
  14. Dear community, as I found out that there's an error in player.item_award (or not directly in it but the function of it) I wanted to ask if someone already fixed it? The error works as following: - Itemshop writes the item into player.item_award with a socket2 value (e.g. 300 for a unique item as 5 hours using time) - Player takes item but the socket2 is not written into player.item so the item doesn't have a use time (0 minutes) - Item purges If nobody fixed it maybe someone could fix it? Regards