Skip to content

fix: [new-layout] Add Pvp Mode + fix: chase and fight#811

Merged
Nottinghster merged 4 commits intoopentibiabr:mainfrom
kokekanon:fix-pvp
Jul 9, 2024
Merged

fix: [new-layout] Add Pvp Mode + fix: chase and fight#811
Nottinghster merged 4 commits intoopentibiabr:mainfrom
kokekanon:fix-pvp

Conversation

@kokekanon
Copy link
Copy Markdown
Contributor

@kokekanon kokekanon commented Jul 8, 2024

test in:

  • tfs otland 13.10 main repo
  • OTC main repo vs 3.5 release

theoretically functional, send the correct package.

not yet approved until someone tests it

I don't know how to testify that.
I could only compare the 3.5 packet vs main repo packet

bfdgdf

image

image

fix:
#794
opentibiabr/canary#2736

ezgif-3-439606a248

TFS 13.10

void ProtocolGame::parseFightModes(NetworkMessage& msg)
{
	uint8_t rawFightMode = msg.getByte();  // 1 - offensive, 2 - balanced, 3 - defensive
	uint8_t rawChaseMode = msg.getByte();  // 0 - stand while fighting, 1 - chase opponent
	uint8_t rawSecureMode = msg.getByte(); // 0 - can't attack unmarked, 1 - can attack unmarked
	uint8_t rawPvpMode = msg.getByte(); // pvp mode introduced in 10.0

	fightMode_t fightMode;
	if (rawFightMode == 1) {
		fightMode = FIGHTMODE_ATTACK;
	} else if (rawFightMode == 2) {
		fightMode = FIGHTMODE_BALANCED;
	} else {
		fightMode = FIGHTMODE_DEFENSE;
	}

	std::cout << "/////////////////////////////////////// " << std::endl;
	std::cout << "FightMode: " << static_cast<int>(fightMode) << std::endl;
	std::cout << "ChaseMode: " << static_cast<int>(rawChaseMode) << std::endl;
	std::cout << "SecureMode: " << static_cast<int>(rawSecureMode) << std::endl;
	std::cout << "PvpMode: " << static_cast<int>(rawPvpMode) << std::endl;
	std::cout << "/////////////////////////////////////// " << std::endl;

@Nottinghster
Copy link
Copy Markdown
Contributor

Nottinghster commented Jul 8, 2024

Did you tested with minimized inventory ?
Also, when minimized, you can check/select DontChase and ChaseOpponent at the same time, this is wrong...
Unfortunately, I can't test right now, because I'm on my job

@kokekanon
Copy link
Copy Markdown
Contributor Author

vvv

@Nottinghster
Copy link
Copy Markdown
Contributor

Nottinghster commented Jul 9, 2024

@luanluciano93 @majestyotbr can you test ?

@majestyotbr
Copy link
Copy Markdown
Contributor

Tested, it's working with Canary.

@kokekanon kokekanon marked this pull request as ready for review July 9, 2024 21:26
@majestyotbr majestyotbr linked an issue Jul 9, 2024 that may be closed by this pull request
5 tasks
@Nottinghster Nottinghster merged commit c5c6141 into opentibiabr:main Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cant attack player and gain skull protocol 11

3 participants