diff --git a/src/canary_server.cpp b/src/canary_server.cpp index 0f7f8cb954e..c6b918126a3 100644 --- a/src/canary_server.cpp +++ b/src/canary_server.cpp @@ -351,7 +351,6 @@ void CanaryServer::loadModules() { #else modulesLoadHelper((g_game().loadAppearanceProtobuf(coreFolder + "/items/appearances.dat") == ERROR_NONE), "appearances.dat"); #endif - modulesLoadHelper(Item::items.loadFromXml(), "items.xml"); // Load XML folder dependencies (order matters) modulesLoadHelper(g_vocations().loadFromXml(), "XML/vocations.xml"); diff --git a/src/creatures/players/achievement/player_achievement.cpp b/src/creatures/players/achievement/player_achievement.cpp index 2db53dbe776..69b22c5605c 100644 --- a/src/creatures/players/achievement/player_achievement.cpp +++ b/src/creatures/players/achievement/player_achievement.cpp @@ -129,7 +129,9 @@ void PlayerAchievement::sendUnlockedSecretAchievements() { m_achievementsUnlocked.push_back({ achievement, achievCreatedTime }); } + #if CLIENT_VERSION > 1100 m_player.sendCyclopediaCharacterAchievements(unlockedSecret, m_achievementsUnlocked); + #endif } const std::shared_ptr &PlayerAchievement::getUnlockedKV() { diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index 84733282c64..67049288304 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -2682,10 +2682,12 @@ BlockType_t Player::blockHit(std::shared_ptr attacker, CombatType_t co } void Player::death(std::shared_ptr lastHitCreature) { +#if CLIENT_VERSION >= 870 if (!g_configManager().getBoolean(TOGGLE_MOUNT_IN_PZ, __FUNCTION__) && isMounted()) { dismount(); g_game().internalCreatureChangeOutfit(getPlayer(), defaultOutfit); } + #endif loginPosition = town->getTemplePosition(); @@ -6147,11 +6149,13 @@ void Player::sendClosePrivate(uint16_t channelId) { } } +#if CLIENT_VERSION > 1100 void Player::sendCyclopediaCharacterAchievements(uint16_t secretsUnlocked, std::vector> achievementsUnlocked) { if (client) { client->sendCyclopediaCharacterAchievements(secretsUnlocked, achievementsUnlocked); } } +#endif uint64_t Player::getMoney() const { std::vector> containers; diff --git a/src/items/functions/item/item_parse.cpp b/src/items/functions/item/item_parse.cpp index 2d1ba9301c5..bb678c79996 100644 --- a/src/items/functions/item/item_parse.cpp +++ b/src/items/functions/item/item_parse.cpp @@ -1029,28 +1029,39 @@ void ItemParse::createAndRegisterScript(ItemType &itemType, pugi::xml_node attri if (moveevent && (moveevent->getEventType() == MOVE_EVENT_EQUIP || moveevent->getEventType() == MOVE_EVENT_DEEQUIP)) { if (slotName == "head") { moveevent->setSlot(SLOTP_HEAD); + itemType.slotPosition |= SLOTP_HEAD; } else if (slotName == "necklace") { moveevent->setSlot(SLOTP_NECKLACE); + itemType.slotPosition |= SLOTP_NECKLACE; } else if (slotName == "backpack") { moveevent->setSlot(SLOTP_BACKPACK); + itemType.slotPosition |= SLOTP_BACKPACK; } else if (slotName == "armor" || slotName == "body") { moveevent->setSlot(SLOTP_ARMOR); + itemType.slotPosition |= SLOTP_ARMOR; } else if (slotName == "right-hand") { moveevent->setSlot(SLOTP_RIGHT); + itemType.slotPosition &= ~SLOTP_LEFT; } else if (slotName == "left-hand") { moveevent->setSlot(SLOTP_LEFT); + itemType.slotPosition &= ~SLOTP_RIGHT; } else if (slotName == "hand" || slotName == "shield") { moveevent->setSlot(SLOTP_RIGHT | SLOTP_LEFT); } else if (slotName == "legs") { moveevent->setSlot(SLOTP_LEGS); + itemType.slotPosition |= SLOTP_LEGS; } else if (slotName == "feet") { moveevent->setSlot(SLOTP_FEET); + itemType.slotPosition |= SLOTP_FEET; } else if (slotName == "ring") { moveevent->setSlot(SLOTP_RING); + itemType.slotPosition |= SLOTP_RING; } else if (slotName == "ammo") { moveevent->setSlot(SLOTP_AMMO); + itemType.slotPosition |= SLOTP_AMMO; } else if (slotName == "two-handed") { moveevent->setSlot(SLOTP_TWO_HAND); + itemType.slotPosition |= SLOTP_TWO_HAND; } else { g_logger().warn("[{}] unknown slot type '{}'", __FUNCTION__, slotName); } @@ -1058,9 +1069,9 @@ void ItemParse::createAndRegisterScript(ItemType &itemType, pugi::xml_node attri uint16_t id = weapon->getID(); ItemType &it = Item::items.getItemType(id); if (slotName == "two-handed") { - it.slotPosition = SLOTP_TWO_HAND; + itemType.slotPosition |= SLOTP_TWO_HAND; } else { - it.slotPosition = SLOTP_HAND; + itemType.slotPosition |= SLOTP_HAND; } } } else if (stringKey == "level") { diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index 734848adaa9..11c350f82f2 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -7355,7 +7355,7 @@ void ProtocolGame::sendAddCreature(std::shared_ptr creature, const Pos msg.add(0x32); // beat duration (50) #if CLIENT_VERSION < 1310 - if (player->getAccountType() >= account::ACCOUNT_TYPE_NORMAL) { + if (player->getAccountType() >= ACCOUNT_TYPE_NORMAL) { msg.addByte(0x01); } else { msg.addByte(0x00);