Example #1
0
bool CPetControl::isSuccUBusActive() const {
	if (!_activeNPC)
		return false;

	CString name = getName();
	return name.containsIgnoreCase("Succubus") || name.containsIgnoreCase("Sub");
}
Example #2
0
bool CPetControl::isDoorOrBellbotPresent() const {
	CGameManager *gameManager = getGameManager();
	if (!gameManager)
		return false;
	CViewItem *view = gameManager->getView();
	if (!view)
		return false;

	for (CTreeItem *treeItem = view->getFirstChild(); treeItem;
			treeItem = treeItem->scan(view)) {
		CString name = treeItem->getName();
		if (dynamic_cast<CGameObject *>(treeItem) &&
				(name.containsIgnoreCase("Doorbot") || name.containsIgnoreCase("BellBot")))
			return true;
	}

	return false;
}