<commit_before>/*
 * SurveyCMinigameSuiCallback.h
 *
 *  Created on: may 22, 2012
 *      Author: kyle
 */

#ifndef SURVEYCMINIGAMESUICALLBACK_H_
#define SURVEYCMINIGAMESUICALLBACK_H_


#include "server/zone/objects/tangible/tool/SurveyTool.h"
#include "server/zone/objects/player/sui/SuiCallback.h"
#include "server/zone/objects/player/sessions/survey/SurveySession.h"

class SurveyCMinigameSuiCallback : public SuiCallback {
public:
	SurveyCMinigameSuiCallback(ZoneServer* server)
		: SuiCallback(server) {
	}

	void run(CreatureObject* player, SuiBox* suiBox, bool cancelPressed, Vector<UnicodeString>* args) {
		if (cancelPressed)
			return;

		if(player->getPosture() > CreaturePosture::CROUCHED){
				player->sendSystemMessage("@error_message:survey_standing");  // "You must be standing to take a survey or samples.");
				return;
		}

		ManagedReference<SurveySession*> session = cast<SurveySession*>(player->getActiveSession(SessionFacadeType::SURVEY));

		if(!player->isStanding()){

		}

		if(session == NULL) {
			return;
		}

		if (args->size() < 1)<commit_msg>[fixed] Removed empty if statement<commit_after>/*
 * SurveyCMinigameSuiCallback.h
 *
 *  Created on: may 22, 2012
 *      Author: kyle
 */

#ifndef SURVEYCMINIGAMESUICALLBACK_H_
#define SURVEYCMINIGAMESUICALLBACK_H_


#include "server/zone/objects/tangible/tool/SurveyTool.h"
#include "server/zone/objects/player/sui/SuiCallback.h"
#include "server/zone/objects/player/sessions/survey/SurveySession.h"

class SurveyCMinigameSuiCallback : public SuiCallback {
public:
	SurveyCMinigameSuiCallback(ZoneServer* server)
		: SuiCallback(server) {
	}

	void run(CreatureObject* player, SuiBox* suiBox, bool cancelPressed, Vector<UnicodeString>* args) {
		if (cancelPressed)
			return;

		if(player->getPosture() > CreaturePosture::CROUCHED){
				player->sendSystemMessage("@error_message:survey_standing");  // "You must be standing to take a survey or samples.");
				return;
		}

		ManagedReference<SurveySession*> session = cast<SurveySession*>(player->getActiveSession(SessionFacadeType::SURVEY));

		if(session == NULL) {
			return;
		}

		if (args->size() < 1)
{'fraction_non_alphanumeric': 0.12511715089034678, 'fraction_numerical': 0.006560449859418931, 'mean_word_length': 5.279411764705882, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 20, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5836183', 'n_tokens_mistral': 812, 'n_tokens_neox': 737, 'n_words': 128}