Advertisement
Kapa3a

Fix blocare 2 conturi OX

Nov 23rd, 2023
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.43 KB | Source Code | 0 0
  1. Open OXEvent.h, find GetAttenderCount() and add those things under that line.
  2.  
  3.     // Ox-event IP-Checker
  4.     public:
  5.         bool CheckIpAddress(LPCHARACTER ch);
  6.         void RemoveFromAttenderList(DWORD dwPID);
  7.        
  8. ------------------------------------
  9. Open OXEvent.cpp, add those lines after COxEventManager::LogWinner()
  10.  
  11. bool COXEventManager::CheckIpAddress(LPCHARACTER ch)
  12. {
  13.     for (itertype(m_map_attender) it = m_map_attender.begin(); it != m_map_attender.end(); ++it)
  14.     {
  15.         LPCHARACTER tch = CHARACTER_MANAGER::Instance().FindByPID(it->second);
  16.         if (!tch || !tch->GetDesc())
  17.             continue;
  18.  
  19.         if (!strcmp(ch->GetDesc()->GetHostName(), tch->GetDesc()->GetHostName()) && ch->GetMapIndex() == tch->GetMapIndex())
  20.         {
  21.             LogManager::Instance().HackLog("MULTI_IP_OX", ch);
  22.             ch->GoHome();
  23.             return false;
  24.         }
  25.     }
  26.  
  27.     return true;
  28. }
  29.  
  30.  
  31. void COXEventManager::RemoveFromAttenderList(DWORD dwPID)
  32. {
  33.     m_map_attender.erase(dwPID);
  34. }
  35.  
  36. bool COXEventManager::EnterAttender(LPCHARACTER pkChar)
  37. {
  38.     DWORD pid = pkChar->GetPlayerID();
  39.    
  40.     if (CheckIpAddress(pkChar))
  41.     {
  42.         m_map_char.insert(std::make_pair(pid, pid));
  43.         m_map_attender.insert(std::make_pair(pid, pid));
  44.         return true;
  45.     }
  46.  
  47.     return false;
  48. }
  49.  
  50. -----------------------------------------------
  51. char.cpp
  52.  
  53. Find:
  54. MessengerManager::instance().Logout(GetName());
  55.  
  56. Add it under:
  57.     if (GetMapIndex() == OXEVENT_MAP_INDEX)
  58.         COXEventManager::Instance().RemoveFromAttenderList(GetPlayerID());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement