Right Class ReferenceCommand: turn right.
More...
| |||||||||||||||||||||||||||||||||||||
Public Member Functions | |
| Right () | |
| void | Execute (InSocket *, const std::string ¶ms, Parse &) |
| Execute command. | |
| std::string | Category () |
| Get command category. | |
Definition at line 28 of file Right.h.
| void Right::Execute | ( | InSocket * | , | |
| const std::string & | arg, | |||
| Parse & | ||||
| ) | [virtual] |
Execute command.
Implements Command.
Definition at line 26 of file Right.cpp.
References Player::GetFacing(), Look::LookMap(), and Player::SetFacing().
00027 { 00028 Player pl(from -> GetDatabase(), from -> GetAccountName()); 00029 if (!pl.GetFacing()) 00030 pl.SetFacing(1); 00031 switch (pl.GetFacing()) 00032 { 00033 case 1: // north 00034 pl.SetFacing(3); 00035 break; 00036 case 2: // south 00037 pl.SetFacing(4); 00038 break; 00039 case 3: // east 00040 pl.SetFacing(2); 00041 break; 00042 case 4: // west 00043 pl.SetFacing(1); 00044 break; 00045 } 00046 Look::LookMap(from); 00047 from -> SetPrompt(); 00048 }
| std::string Right::Category | ( | ) | [inline, virtual] |
1.4.4