mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-05-01 18:19:20 +02:00
allow ctrl+z for everyone. Fix issue with runes charges and capacity.
This commit is contained in:
parent
6e7987746b
commit
858a27acc8
@ -92,10 +92,6 @@ function Player:onMoveCreature(creature, fromPosition, toPosition)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Player:onReportBug(message, position, category)
|
function Player:onReportBug(message, position, category)
|
||||||
if self:getAccountType() == ACCOUNT_TYPE_NORMAL then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
local name = self:getName()
|
local name = self:getName()
|
||||||
local file = io.open("data/reports/bugs/" .. name .. " report.txt", "a")
|
local file = io.open("data/reports/bugs/" .. name .. " report.txt", "a")
|
||||||
|
|
||||||
|
@ -70,7 +70,4 @@ function onStartup()
|
|||||||
addEvent(setBloomingGriffinclaw, 10000)
|
addEvent(setBloomingGriffinclaw, 10000)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- temporary
|
|
||||||
Game.setGameState(GAME_STATE_CLOSED)
|
|
||||||
end
|
end
|
||||||
|
@ -837,7 +837,7 @@ void BehaviourDatabase::checkAction(const NpcBehaviourAction* action, Player* pl
|
|||||||
int32_t itemId = evaluate(action->expression, player, message);
|
int32_t itemId = evaluate(action->expression, player, message);
|
||||||
const ItemType& it = Item::items[itemId];
|
const ItemType& it = Item::items[itemId];
|
||||||
|
|
||||||
if (it.stackable) {
|
if (it.stackable && !it.isRune()) {
|
||||||
do {
|
do {
|
||||||
int32_t count = std::min<int32_t>(100, amount);
|
int32_t count = std::min<int32_t>(100, amount);
|
||||||
amount -= count;
|
amount -= count;
|
||||||
|
@ -823,7 +823,7 @@ bool Item::hasProperty(ITEMPROPERTY prop) const
|
|||||||
uint32_t Item::getWeight() const
|
uint32_t Item::getWeight() const
|
||||||
{
|
{
|
||||||
uint32_t weight = getBaseWeight();
|
uint32_t weight = getBaseWeight();
|
||||||
if (isStackable()) {
|
if (isStackable() && !isRune()) {
|
||||||
return weight * std::max<uint32_t>(1, getItemCount());
|
return weight * std::max<uint32_t>(1, getItemCount());
|
||||||
}
|
}
|
||||||
return weight;
|
return weight;
|
||||||
@ -840,8 +840,6 @@ std::string Item::getDescription(const ItemType& it, int32_t lookDistance,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (it.isRune()) {
|
if (it.isRune()) {
|
||||||
uint32_t charges = std::max(static_cast<uint32_t>(1), static_cast<uint32_t>(item == nullptr ? it.charges : item->getCharges()));
|
|
||||||
|
|
||||||
if (it.runeLevel > 0) {
|
if (it.runeLevel > 0) {
|
||||||
s << " for level " << it.runeLevel;
|
s << " for level " << it.runeLevel;
|
||||||
}
|
}
|
||||||
@ -851,7 +849,7 @@ std::string Item::getDescription(const ItemType& it, int32_t lookDistance,
|
|||||||
}
|
}
|
||||||
|
|
||||||
s << " for magic level " << it.runeMagLevel;
|
s << " for magic level " << it.runeMagLevel;
|
||||||
s << ". It's an \"" << it.runeSpellName << "\"-spell (" << charges << "x). ";
|
s << ". It's an \"" << it.runeSpellName << "\"-spell (" << subType << "x). ";
|
||||||
} else if (it.isDoor() && item) {
|
} else if (it.isDoor() && item) {
|
||||||
if (item->hasAttribute(ITEM_ATTRIBUTE_DOORLEVEL)) {
|
if (item->hasAttribute(ITEM_ATTRIBUTE_DOORLEVEL)) {
|
||||||
s << " for level " << item->getIntAttr(ITEM_ATTRIBUTE_DOORLEVEL);
|
s << " for level " << item->getIntAttr(ITEM_ATTRIBUTE_DOORLEVEL);
|
||||||
@ -1022,7 +1020,7 @@ std::string Item::getNameDescription(const ItemType& it, const Item* item /*= nu
|
|||||||
|
|
||||||
const std::string& name = (item ? item->getName() : it.name);
|
const std::string& name = (item ? item->getName() : it.name);
|
||||||
if (!name.empty()) {
|
if (!name.empty()) {
|
||||||
if (it.stackable && subType > 1) {
|
if (it.stackable && !it.isRune() && subType > 1) {
|
||||||
if (it.showCount) {
|
if (it.showCount) {
|
||||||
s << subType << ' ';
|
s << subType << ' ';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user