public IMobileObjectCommand GetCommand(IMobileObject performer, string command) { IMobileObjectCommand iMobileObjectCommand; PcCommandsLookup.TryGetValue(command, out iMobileObjectCommand); if (iMobileObjectCommand == null) { if (performer.God) { GodCommandsLookup.TryGetValue(command, out iMobileObjectCommand); } } return(iMobileObjectCommand); }
public IMobileObjectCommand GetCommand(IMobileObject performer, string command) { if (!PcCommandsLookup.TryGetValue(command, out IMobileObjectCommand iMobileObjectCommand)) { if (performer.God) { GodCommandsLookup.TryGetValue(command, out iMobileObjectCommand); } if (performer is INonPlayerCharacter) { NpcCommandsLookup.TryGetValue(command, out iMobileObjectCommand); } } return(iMobileObjectCommand); }