void CmdTest( IBrain *apBrain, std::string &arCommand, std::string &arArgument )
{
IThing *pBody = apBrain->GetThing();
if ( pBody == NULL )
{
apBrain->PutOutput("Oh no! You've lost your body!\r\n");
return;
}
…
}
if ( apTarget->GetBrain() != NULL )
{
// Inform the target that s/he has an attacker.
apTarget->GetBrain()->SetKnowledge( IBrain::eATTACKER, apHitter->GetID() );
}
Does anyone have an original way of handling this? Or does most everyone follow the same route that Diku did?