Pagina 1 din 1

[C++]Fix bug biolog Vegas

Scris: Mie Feb 22, 2023 8:45 pm
de F. Gabriel
Caută în biolog.cpp:

Cod: Selectaţi tot

ch->SetBiologState("biolog_lv92.used_window", 1);
Adaugă sub:

Cod: Selectaţi tot

ch->SetBiologState("biolog_lv92.reward", 1);
Sub întreaga structură a funcției if, adaugă:

Cod: Selectaţi tot

	if (pSelectReward[0] != 0 && ch->GetBiologState(pTableStringGlobal[3][8]) == 1)
	{
		if (!strcmp(iReward, "92_reward_1") && pSelectReward[0] != 0){
			return ch->ChatPacket(CHAT_TYPE_INFO, "<Biolog> Misiune indisponibilă.");
		}
		if (!strcmp(iReward, "92_reward_2") && pSelectReward[0] != 0){
			return ch->ChatPacket(CHAT_TYPE_INFO, "<Biolog> Misiune indisponibilă.");
		}
		if (!strcmp(iReward, "92_reward_3") && pSelectReward[0] != 0){
			return ch->ChatPacket(CHAT_TYPE_INFO, "<Biolog> Misiune indisponibilă.");
		}
	}
Imagine

Caută funcția:

Cod: Selectaţi tot

ch->SetBiologState("biolog_lv94.used_window", 1);
Adaugă sub:

Cod: Selectaţi tot

ch->SetBiologState("biolog_lv94.reward", 1);
Sub întreaga structură a funcției if, adaugă:

Cod: Selectaţi tot

	if (pSelectReward[1] != 0 && ch->GetBiologState(pTableStringGlobal[3][9]) == 1)
	{
		if (!strcmp(iReward, "94_reward_1") && pSelectReward[0] != 0){
			return ch->ChatPacket(CHAT_TYPE_INFO, "<Biolog> Teapa, dc incerci buguri?.");
		}
		if (!strcmp(iReward, "94_reward_2") && pSelectReward[0] != 0){
			return ch->ChatPacket(CHAT_TYPE_INFO, "<Biolog> Teapa, dc incerci buguri?.");
		}
		if (!strcmp(iReward, "94_reward_3") && pSelectReward[0] != 0){
			return ch->ChatPacket(CHAT_TYPE_INFO, "<Biolog> Teapa, dc incerci buguri?.");
		}
	}
Imagine

Re: [C++]Fix bug biolog Vegas

Scris: Mie Dec 20, 2023 5:51 pm
de aometaphor
Să corectezi asta, unii n-o să fie atenți:

Caută în biolog.cpp:

ch->SetBiologState("biolog_lv94.used_window", 1);

Adaugă sub:

ch->SetBiologState("biolog_lv92.reward", 1);

------ ÎN ------------------

Caută în biolog.cpp:

ch->SetBiologState("biolog_lv92.used_window", 1);

Adaugă sub:

ch->SetBiologState("biolog_lv92.reward", 1);

Re: [C++]Fix bug biolog Vegas

Scris: Mie Dec 20, 2023 11:53 pm
de aometaphor
Adaug inca ceva:

SCHIMBA

Cod: Selectaţi tot

	if (pSelectReward[1] != 0 && ch->GetBiologState(pTableStringGlobal[3][9]) == 1)
	{
		if (!strcmp(iReward, "94_reward_1") && pSelectReward[0] != 0){
			return ch->ChatPacket(CHAT_TYPE_INFO, "<Biolog> Teapa, dc incerci buguri?.");
		}
		if (!strcmp(iReward, "94_reward_2") && pSelectReward[0] != 0){
			return ch->ChatPacket(CHAT_TYPE_INFO, "<Biolog> Teapa, dc incerci buguri?.");
		}
		if (!strcmp(iReward, "94_reward_3") && pSelectReward[0] != 0){
			return ch->ChatPacket(CHAT_TYPE_INFO, "<Biolog> Teapa, dc incerci buguri?.");
		}
	}
CU

Cod: Selectaţi tot

	if (pSelectReward[1] != 0 && ch->GetBiologState(pTableStringGlobal[3][9]) == 1)
	{
		if (!strcmp(iReward, "94_reward_1") && pSelectReward[1] != 0){
			return ch->ChatPacket(CHAT_TYPE_INFO, "<Biolog> Teapa, dc incerci buguri?.");
		}
		if (!strcmp(iReward, "94_reward_2") && pSelectReward[1] != 0){
			return ch->ChatPacket(CHAT_TYPE_INFO, "<Biolog> Teapa, dc incerci buguri?.");
		}
		if (!strcmp(iReward, "94_reward_3") && pSelectReward[1] != 0){
			return ch->ChatPacket(CHAT_TYPE_INFO, "<Biolog> Teapa, dc incerci buguri?.");
		}
	}
SI

Cod: Selectaţi tot

void BiologManager::SelectBonusType(LPCHARACTER ch, const char* iReward)
{
	int pSelectReward[] =
	{
		(ch->GetQuestFlag("biolog_lv92.reward")), (ch->GetQuestFlag("biolog_lv92.reward"))
	};
CU

Cod: Selectaţi tot

void BiologManager::SelectBonusType(LPCHARACTER ch, const char* iReward)
{
	int pSelectReward[] =
	{
		(ch->GetQuestFlag("biolog_lv92.reward")), (ch->GetQuestFlag("biolog_lv94.reward"))
	};

Re: [C++]Fix bug biolog Vegas

Scris: Joi Dec 21, 2023 3:10 am
de aometaphor
Also, imi cer scuze ca dau atata reply, adauga si fixul asta:

Cod: Selectaţi tot

void BiologManager::SendWindow_SelectType(LPCHARACTER ch, int iType)
{	
	int pGetCompleted[] = {(ch->GetQuestFlag("biolog_lv92.used_window")), (ch->GetQuestFlag("biolog_lv94.used_window"))};
	
	switch (iType)
	{
		case 1:
			if (pGetCompleted[0] != 1)	
			{	
				std::string arg1 = (const char*) pPopUp[8][0];		boost::algorithm::replace_all(arg1, " ", "$");
				std::string arg2 = (const char*) pPopUp[8][1];		boost::algorithm::replace_all(arg2, " ", "$");
				std::string arg3 = (const char*) pPopUp[8][2];		boost::algorithm::replace_all(arg3, " ", "$");	
				std::string arg4 = (const char*) pPopUp[8][3];		boost::algorithm::replace_all(arg4, " ", "$");		
				
				char buf[512+1];
				snprintf(buf, sizeof(buf), "BINARY_Biolog_SelectReward %d %s %s %d %s %d %s %d", (int)1, arg1.c_str(), arg2.c_str(), (int)tableBonus[8][1], arg3.c_str(), (int)tableBonus[8][3], arg4.c_str(), (int)tableBonus[8][5]);
				ch->ChatPacket(CHAT_TYPE_COMMAND, buf);	
			}
		break;
		case 2:	
			if (pGetCompleted[1] != 1)
			{	
				std::string arg1 = (const char*) pPopUp[9][0];		boost::algorithm::replace_all(arg1, " ", "$");
				std::string arg2 = (const char*) pPopUp[9][1];		boost::algorithm::replace_all(arg2, " ", "$");
				std::string arg3 = (const char*) pPopUp[9][2];		boost::algorithm::replace_all(arg3, " ", "$");	
				std::string arg4 = (const char*) pPopUp[9][3];		boost::algorithm::replace_all(arg4, " ", "$");		
				
				char buf[512+1];
				snprintf(buf, sizeof(buf), "BINARY_Biolog_SelectReward %d %s %s %d %s %d %s %d", (int)2, arg1.c_str(), arg2.c_str(), (int)tableBonus[9][1], arg3.c_str(), (int)tableBonus[9][3], arg4.c_str(), (int)tableBonus[9][5]);
				ch->ChatPacket(CHAT_TYPE_COMMAND, buf);		
			}
		break;
	}	
}
Se afisau bonusurile de la misiunea de 92 si in misiunea de 94.