diff --git a/data/XML/mounts.xml b/data/XML/mounts.xml index accf362f4c..b50f8e885d 100644 --- a/data/XML/mounts.xml +++ b/data/XML/mounts.xml @@ -205,4 +205,8 @@ + + + + diff --git a/data/XML/outfits.xml b/data/XML/outfits.xml index 751a7d7623..0902c44aa3 100644 --- a/data/XML/outfits.xml +++ b/data/XML/outfits.xml @@ -109,6 +109,8 @@ + + @@ -219,4 +221,6 @@ + + diff --git a/data/creaturescripts/scripts/login.lua b/data/creaturescripts/scripts/login.lua index 099e2b6b46..a93abf28d2 100644 --- a/data/creaturescripts/scripts/login.lua +++ b/data/creaturescripts/scripts/login.lua @@ -25,6 +25,7 @@ function onLogin(player) -- Update client stats player:updateClientExpDisplay() player:sendHotkeyPreset() + player:disableLoginMusic() -- achievements points for highscores if not player:getStorageValue(PlayerStorageKeys.achievementsTotal) then diff --git a/data/items/items.otb b/data/items/items.otb index a76ae7874a..2b225dfbd1 100644 Binary files a/data/items/items.otb and b/data/items/items.otb differ diff --git a/data/lib/core/achievements.lua b/data/lib/core/achievements.lua index 981244bde2..c5f6861a36 100644 --- a/data/lib/core/achievements.lua +++ b/data/lib/core/achievements.lua @@ -608,6 +608,11 @@ achievements = { [507] = {clientId = 539, name = "Measuring the World", grade = 1, points = 3, description = "Step by step you discovered many of the secrets hidden in the world, thus gaining the right to wear the Discoverer outfit and hat. Made-to-measure for a brave traveller of the wilds."}, [508] = {clientId = 540, name = "Ripp-Ripp Hooray!", grade = 1, points = 3, description = "Don't get carried away by your success. Get carried away by your ripptor."}, [509] = {clientId = 531, name = "First Achievement", grade = 1, points = 1, secret = true, description = "Congratulations to your very first achievement! ... Well, not really. But imagine, it is. Because at this point during your journey into the past, achievements have been introduced."}, + + -- 13.10 + [510] = {clientId = 542, name = "Mutagenius", grade = 1, points = 2, description = "You accomplished the impossible and created 16 mutagens of corresponding colours."}, + [511] = {clientId = 543, name = "Strangest Thing", grade = 1, points = 3, description = "Only its rider can love this abomination of a mount."}, + [512] = {clientId = 541, name = "Warrior of the Iks", grade = 1, points = 2, description = "Combining unabating courage in combat and respect for the traditions and culture of the ancient Iks earned you the honours of true Aucar."}, } ACHIEVEMENT_FIRST = 1 diff --git a/data/lib/core/player.lua b/data/lib/core/player.lua index 41a0cff164..80d9c94e01 100644 --- a/data/lib/core/player.lua +++ b/data/lib/core/player.lua @@ -726,3 +726,14 @@ function Player.sendHotkeyPreset(self) msg:sendToPlayer(self) return true end + +function Player.disableLoginMusic(self) + local msg = NetworkMessage() + msg:addByte(0x85) + msg:addByte(0x01) + msg:addByte(0x00) + msg:addByte(0x00) + msg:sendToPlayer(self) + msg:delete() + return true +end diff --git a/data/scripts/network/bestiary_info.lua b/data/scripts/network/bestiary_info.lua index 4c7cad2547..02163d4aae 100644 --- a/data/scripts/network/bestiary_info.lua +++ b/data/scripts/network/bestiary_info.lua @@ -91,6 +91,7 @@ function handler.onReceive(player, msg) response:addU32(monsterType:getExperience()) response:addU16(monsterType:getBaseSpeed()) response:addU16(monsterType:getArmor()) + response:addDouble(0) -- damage mitigation end if progress > 2 then diff --git a/data/scripts/network/cyclopedia_character.lua b/data/scripts/network/cyclopedia_character.lua index 09b2dd0800..85be7d2768 100644 --- a/data/scripts/network/cyclopedia_character.lua +++ b/data/scripts/network/cyclopedia_character.lua @@ -58,6 +58,8 @@ local function sendCombatStats(self, msg) msg:addU16(self:getTotalArmor()) msg:addU16(self:getTotalDefense()) + msg:addDouble(0) -- damage mitigation (in %) + -- element resistances count msg:addByte(0) -- structure: @@ -98,10 +100,10 @@ local function sendGeneralStats(self, msg) msg:addU16(0) -- exp boost remaining time msg:addByte(0) -- enable exp boost store button - msg:addU16(self:getHealth()) - msg:addU16(self:getMaxHealth()) - msg:addU16(self:getMana()) - msg:addU16(self:getMaxMana()) + msg:addU32(self:getHealth()) + msg:addU32(self:getMaxHealth()) + msg:addU32(self:getMana()) + msg:addU32(self:getMaxMana()) msg:addByte(self:getSoul()) msg:addU16(self:getStamina()) diff --git a/src/definitions.h b/src/definitions.h index c7aafc934d..2868fb3109 100644 --- a/src/definitions.h +++ b/src/definitions.h @@ -8,9 +8,9 @@ static constexpr auto STATUS_SERVER_NAME = "The Forgotten Server"; static constexpr auto STATUS_SERVER_VERSION = "1.5"; static constexpr auto STATUS_SERVER_DEVELOPERS = "The Forgotten Server Team"; -static constexpr auto CLIENT_VERSION_MIN = 1290; -static constexpr auto CLIENT_VERSION_MAX = 1291; -static constexpr auto CLIENT_VERSION_STR = "12.90"; +static constexpr auto CLIENT_VERSION_MIN = 1310; +static constexpr auto CLIENT_VERSION_MAX = 1311; +static constexpr auto CLIENT_VERSION_STR = "13.10"; static constexpr auto AUTHENTICATOR_DIGITS = 6U; static constexpr auto AUTHENTICATOR_PERIOD = 30U; diff --git a/src/itemloader.h b/src/itemloader.h index b593782068..f5f8d54df4 100644 --- a/src/itemloader.h +++ b/src/itemloader.h @@ -97,8 +97,9 @@ enum clientVersion_t CLIENT_VERSION_1286 = 62, CLIENT_VERSION_1287 = 63, CLIENT_VERSION_1290 = 64, + CLIENT_VERSION_1310 = 65, - CLIENT_VERSION_LAST = CLIENT_VERSION_1290 + CLIENT_VERSION_LAST = CLIENT_VERSION_1310 }; enum rootattrib_ diff --git a/src/protocolgame.cpp b/src/protocolgame.cpp index 810e4b4ac0..68d137f4ef 100644 --- a/src/protocolgame.cpp +++ b/src/protocolgame.cpp @@ -1779,14 +1779,16 @@ void ProtocolGame::sendBasicData() msg.addByte(0); msg.add(0); } + msg.addByte(player->getVocation()->getClientId()); msg.addByte(0x00); // is prey system enabled (bool) // unlock spells on action bar msg.add(0xFF); for (uint8_t spellId = 0x00; spellId < 0xFF; spellId++) { - msg.addByte(spellId); + msg.add(spellId); } + msg.addByte(player->getVocation()->getMagicShield()); // is magic shield active (bool) writeToOutputBuffer(msg); } @@ -3361,7 +3363,7 @@ void ProtocolGame::sendSpellCooldown(uint8_t spellId, uint32_t time) { NetworkMessage msg; msg.addByte(0xA4); - msg.addByte(spellId); + msg.add(static_cast(spellId)); msg.add(time); writeToOutputBuffer(msg); } @@ -3524,8 +3526,8 @@ void ProtocolGame::AddPlayerStats(NetworkMessage& msg) { msg.addByte(0xA0); - msg.add(std::min(player->getHealth(), std::numeric_limits::max())); - msg.add(std::min(player->getMaxHealth(), std::numeric_limits::max())); + msg.add(static_cast(player->getHealth())); + msg.add(static_cast(player->getMaxHealth())); msg.add(player->hasFlag(PlayerFlag_HasInfiniteCapacity) ? 1000000 : player->getFreeCapacity()); msg.add(player->getExperience()); @@ -3538,8 +3540,8 @@ void ProtocolGame::AddPlayerStats(NetworkMessage& msg) msg.add(0); // store exp bonus msg.add(player->getClientStaminaBonusDisplay()); - msg.add(std::min(player->getMana(), std::numeric_limits::max())); - msg.add(std::min(player->getMaxMana(), std::numeric_limits::max())); + msg.add(static_cast(player->getMana())); + msg.add(static_cast(player->getMaxMana())); msg.addByte(player->getSoul()); msg.add(player->getStaminaMinutes()); @@ -3555,11 +3557,11 @@ void ProtocolGame::AddPlayerStats(NetworkMessage& msg) if (ConditionManaShield* conditionManaShield = dynamic_cast(player->getCondition(CONDITION_MANASHIELD_BREAKABLE))) { - msg.add(conditionManaShield->getManaShield()); // remaining mana shield - msg.add(conditionManaShield->getMaxManaShield()); // total mana shield + msg.add(conditionManaShield->getManaShield()); + msg.add(conditionManaShield->getMaxManaShield()); } else { - msg.add(0); // remaining mana shield - msg.add(0); // total mana shield + msg.add(0); // remaining mana shield + msg.add(0); // total mana shield } } @@ -3583,21 +3585,21 @@ void ProtocolGame::AddPlayerSkills(NetworkMessage& msg) msg.add(0); // base special skill } - // fatal, dodge, momentum - msg.add(0); - msg.add(0); - - msg.add(0); - msg.add(0); + msg.addByte(0); // element magic level + // structure: + // u8 client element id + // u16 bonus element ml - msg.add(0); - msg.add(0); + // fatal, dodge, momentum + for (int i = 0; i < 3; ++i) { + msg.add(0); + msg.add(0); + } // to do: bonus cap - msg.add(player->hasFlag(PlayerFlag_HasInfiniteCapacity) ? 1000000 - : player->getCapacity()); // base + bonus capacity - msg.add(player->hasFlag(PlayerFlag_HasInfiniteCapacity) ? 1000000 - : player->getCapacity()); // base capacity + uint32_t capacityValue = player->hasFlag(PlayerFlag_HasInfiniteCapacity) ? 1000000 : player->getCapacity(); + msg.add(capacityValue); // base + bonus capacity + msg.add(capacityValue); // base capacity } void ProtocolGame::AddOutfit(NetworkMessage& msg, const Outfit_t& outfit)