L0FIC
Active Member
- Joined
- May 29, 2024
- Messages
- 71
- Reaction score
- 45
Hello Guys,
Using TFS 1.5 (7.72) and Otcv8 client, and i can't get the Protection Zone (Dove/Pigeon) icon to show when I enter protection zones.
In player.cpp this part was previously commented out (ICON_PIGEON), i removed the comments and recompiled and restarted the server, but alas... Still not showing.
I also double checked the const.h definitions for the icons and tried changing uint16_t for uint32_t in the relevant source and header files (protocolgame and conditions as well I believe), did not work either.
I have tried compiling TFS 1.4 [10.98] and running with my otclient and THEN IT WORKS. What makes me confused is that this tells us it's not client related, but the only source files in both tfs 1.4 and 1.5 that have icon_pigeon are const.h and player.cpp.
I tried the code from TFS1.4 in my TFS 1.5 source files, but still no luck.. what does this mean?
I did a lot of testing client side anyways although the troubleshooting points towards server side sources. I could get the PZ icon to show if I added it to show instead of "SWORDS" when attacking a monster for example, so the issue seems to be with the "Condition" itself although PZ is not really a condition in the same manner as Haste or Poisoned or Burned etc..
Thankful for any help!
Best,
Z
Using TFS 1.5 (7.72) and Otcv8 client, and i can't get the Protection Zone (Dove/Pigeon) icon to show when I enter protection zones.
In player.cpp this part was previously commented out (ICON_PIGEON), i removed the comments and recompiled and restarted the server, but alas... Still not showing.
LUA:
uint16_t Player::getClientIcons() const
{
uint16_t icons = 0;
for (Condition* condition : conditions) {
if (!isSuppress(condition->getType())) {
icons |= condition->getIcons();
}
}
if (pzLocked) {
icons |= ICON_REDSWORDS;
}
if (tile && tile->hasFlag(TILESTATE_PROTECTIONZONE)) {
icons |= ICON_PIGEON;
/* Don't show ICON_SWORDS if player is in protection zone.
if (hasBitSet(ICON_SWORDS, icons)) {
icons &= ~ICON_SWORDS;
}*/
}
// Game client debugs with 10 or more icons
// so let's prevent that from happening.
std::bitset<20> icon_bitset(static_cast<uint64_t>(icons));
for (size_t pos = 0, bits_set = icon_bitset.count(); bits_set >= 10; ++pos) {
if (icon_bitset[pos]) {
icon_bitset.reset(pos);
--bits_set;
}
}
return icon_bitset.to_ulong();
}
I also double checked the const.h definitions for the icons and tried changing uint16_t for uint32_t in the relevant source and header files (protocolgame and conditions as well I believe), did not work either.
I have tried compiling TFS 1.4 [10.98] and running with my otclient and THEN IT WORKS. What makes me confused is that this tells us it's not client related, but the only source files in both tfs 1.4 and 1.5 that have icon_pigeon are const.h and player.cpp.
I tried the code from TFS1.4 in my TFS 1.5 source files, but still no luck.. what does this mean?
I did a lot of testing client side anyways although the troubleshooting points towards server side sources. I could get the PZ icon to show if I added it to show instead of "SWORDS" when attacking a monster for example, so the issue seems to be with the "Condition" itself although PZ is not really a condition in the same manner as Haste or Poisoned or Burned etc..
Thankful for any help!
Best,
Z
Attachments
-
1738070001183.webp1.1 KB · Views: 5 · VirusTotal
Last edited: