Skip to content

Commit

Permalink
Fix npc voice interval, walkInterval, baseSpeed and shop storage (#196)
Browse files Browse the repository at this point in the history
Adjusted the interval that npcs send messages in the default chat, adjusted the speed that npcs walk (baseSpeed), adjusted the interval of steps of npcs to 2 seconds and fixed a small bug in the npc shop that prevented items from appearing in the trade in certain scenarios.

Set server version to new release
  • Loading branch information
dudantas committed Feb 8, 2022
1 parent 0397d0c commit 6388163
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion data/npclua/canary.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ npcConfig.outfit = {
}

npcConfig.voices = {
interval = 5000,
interval = 15000,
chance = 20,
{ text = "Welcome to the Canary Server!" }
}
Expand Down
4 changes: 2 additions & 2 deletions src/creatures/npcs/npcs.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class NpcType

uint32_t yellChance = 0;
uint32_t yellSpeedTicks = 0;
uint32_t baseSpeed = 200;
uint32_t walkInterval = 1500;
uint32_t baseSpeed = 100;
uint32_t walkInterval = 2000;

int32_t creatureAppearEvent = -1;
int32_t creatureDisappearEvent = -1;
Expand Down
2 changes: 1 addition & 1 deletion src/server/network/protocol/protocolgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6707,7 +6707,7 @@ void ProtocolGame::AddShopItem(NetworkMessage &msg, const ShopInfo &item, uint16
// Sends the item information empty if the player doesn't have the storage to buy/sell a certain item
int32_t storageValue;
player->getStorageValue(item.storageKey, storageValue);
if (storageValue < item.storageValue)
if (item.storageKey != 0 && storageValue < item.storageValue)
{
AddHiddenShopItem(msg);
return;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#define SRC_UTILS_DEFINITIONS_H_

static constexpr auto STATUS_SERVER_NAME = "Canary";
static constexpr auto STATUS_SERVER_VERSION = "1.1.0";
static constexpr auto STATUS_SERVER_VERSION = "1.1.1";
static constexpr auto STATUS_SERVER_DEVELOPERS = "OpenTibiaBR Organization and Mark Samman";

static constexpr auto AUTHENTICATOR_DIGITS = 6U;
Expand Down

0 comments on commit 6388163

Please sign in to comment.