Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ACMD(do_pvp)
- {
- if (ch->GetArena() != NULL || CArenaManager::instance().IsArenaMap(ch->GetMapIndex()) == true)
- {
- ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't use this in the arena."));
- return;
- }
- #ifdef ENABLE_DUEL_OPTIONS
- char arg1[256], arg2[256];
- two_arguments(argument, arg1, sizeof(arg1), arg2, sizeof(arg2));
- DWORD vid = 0;
- BYTE bIsSpecial = 0;
- str_to_number(vid, arg1);
- str_to_number(bIsSpecial, arg2);
- #else
- char arg1[256];
- one_argument(argument, arg1, sizeof(arg1));
- DWORD vid = 0;
- str_to_number(vid, arg1);
- #endif
- LPCHARACTER pkVictim = CHARACTER_MANAGER::instance().Find(vid);
- if (!pkVictim)
- return;
- if (pkVictim->IsNPC())
- return;
- if (pkVictim->GetArena() != NULL)
- {
- pkVictim->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't use this in the arena."));
- return;
- }
- #ifdef ENABLE_DUEL_OPTIONS
- CPVPManager::instance().Insert(ch, pkVictim, bIsSpecial ? true : false);
- #else
- CPVPManager::instance().Insert(ch, pkVictim);
- #endif
- }
Advertisement
Add Comment
Please, Sign In to add comment