

Public Member Functions | |
| eVoteItemKickServerControlled (bool fromMenu, ePlayerNetID *player) | |
| ~eVoteItemKickServerControlled () | |
Protected Member Functions | |
| virtual bool | DoCheckValid (int senderID) |
| virtual void | DoExecute () |
Private Attributes | |
| bool | fromMenu_ |
Definition at line 1338 of file eVoter.cpp.
| eVoteItemKickServerControlled::eVoteItemKickServerControlled | ( | bool | fromMenu, | |
| ePlayerNetID * | player | |||
| ) | [inline] |
Definition at line 1342 of file eVoter.cpp.
01343 : eVoteItemHarm( player ), eVoteItemKick( player ), fromMenu_( fromMenu ) 01344 {}
| eVoteItemKickServerControlled::~eVoteItemKickServerControlled | ( | ) | [inline] |
| virtual bool eVoteItemKickServerControlled::DoCheckValid | ( | int | senderID | ) | [inline, protected, virtual] |
Reimplemented from eVoteItemKick.
Definition at line 1349 of file eVoter.cpp.
References eVoteItem::CheckValid(), eVoteItemHarm::DoCheckValid(), ePlayerNetID::GetVoter(), eVoter::HarmCount(), eVoteItem::ReBroadcast(), se_kickMinHarm, tNEW, and eVoteItem::Update().
01350 { 01351 // check whether enough harmful votes were collected already 01352 ePlayerNetID * p = GetPlayer(); 01353 if ( fromMenu_ && p && p->GetVoter()->HarmCount() - 1 < se_kickMinHarm ) 01354 { 01355 // try to transfor the vote to a suspension 01356 eVoteItem * item = tNEW ( eVoteItemSuspend )( p ); 01357 01358 // let item check its validity 01359 if ( !item->CheckValid( senderID ) ) 01360 { 01361 delete item; 01362 } 01363 else 01364 { 01365 // no objection? Broadcast it to everyone. 01366 item->Update(); 01367 item->ReBroadcast( senderID ); 01368 } 01369 01370 // and cancel this item here. 01371 return false; 01372 } 01373 01374 // no transformation needed or transformation failed. Proceed as usual. 01375 return eVoteItemHarm::DoCheckValid( senderID ); 01376 };

| virtual void eVoteItemKickServerControlled::DoExecute | ( | ) | [inline, protected, virtual] |
Reimplemented from eVoteItemKick.
Definition at line 1378 of file eVoter.cpp.
References eVoteItemKick::DoExecute().
01379 { 01380 eVoteItemKick::DoExecute(); 01381 }

bool eVoteItemKickServerControlled::fromMenu_ [private] |
Definition at line 1383 of file eVoter.cpp.
1.5.4