Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- EVENTINFO(TimedPvPEventInfo)
- {
- DynamicCharacterPtr eChr;
- DynamicCharacterPtr eVictim;
- BYTE time_second;
- TimedPvPEventInfo()
- : eChr()
- , eVictim()
- , time_second(0)
- {
- }
- };
- EVENTFUNC(timed_event_pvp)
- {
- TimedPvPEventInfo * info = dynamic_cast<TimedPvPEventInfo *>( event->info );
- if ( info == NULL )
- {
- sys_err( "timed_event_pvp> <Factor> Null pointer" );
- return 0;
- }
- LPCHARACTER pvpChr = info->eChr;
- LPCHARACTER pvpVictim = info->eVictim;
- if (pvpChr == NULL) {
- return 0;
- }
- if (info->time_second <= 0)
- {
- pvpVictim->m_pkTimedEventPvP = NULL;
- pvpVictim->m_TimeStartPvP = true;
- CPVPManager::instance().Insert(pvpChr, pvpVictim);
- return 0;
- }
- else
- {
- pvpChr->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("pojedynek_z_%s_rozpocznie_sie_za_%d_sekund."), pvpVictim->GetName(), info->time_second);
- pvpVictim->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("pojedynek_z_%s_rozpocznie_sie_za_%d_sekund."), pvpChr->GetName(), info->time_second);
- --info->time_second;
- }
- return PASSES_PER_SEC(1);
- }
Advertisement
Add Comment
Please, Sign In to add comment