Skip to content

Commit

Permalink
Merge branch 'main' into leave-party-ondeath
Browse files Browse the repository at this point in the history
  • Loading branch information
bdzicc authored Feb 22, 2025
2 parents cf18033 + 01050b3 commit 2d8caa1
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
28 changes: 28 additions & 0 deletions data-otservbr-global/scripts/movements/teleport/candia.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
local config = {
{ position = { x = 33338, y = 32125, z = 7 }, destination = { x = 33574, y = 32224, z = 7 } }, -- Candia > Feyrist
{ position = { x = 33339, y = 32125, z = 7 }, destination = { x = 33575, y = 32224, z = 7 } }, -- Candia > Feyrist
{ position = { x = 33574, y = 32222, z = 7 }, destination = { x = 33338, y = 32127, z = 7 } }, -- Feyrist > Candia
{ position = { x = 33575, y = 32222, z = 7 }, destination = { x = 33339, y = 32127, z = 7 } }, -- Feyrist > Candia
}

local candia = MoveEvent()
function candia.onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return false
end

for value in pairs(config) do
if Position(config[value].position) == player:getPosition() then
player:teleportTo(Position(config[value].destination))
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
return true
end
end
end

candia:type("stepin")
for value in pairs(config) do
candia:position(config[value].position)
end
candia:register()
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function movements_crackedTile.onStepIn(creature, item, position, fromPosition)
local min = player:getMaxHealth() * 0.2
local max = player:getMaxHealth() * 0.5

doTargetCombat(0, player, COMBAT_DEATHDAMAGE, -min, -max, CONST_ME_MORTAREA, ORIGIN_NONE)
doTargetCombatHealth(0, player, COMBAT_DEATHDAMAGE, -min, -max, CONST_ME_MORTAREA, ORIGIN_NONE)

return true
end
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/startup/tables/chest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2068,7 +2068,7 @@ ChestUnique = {
},
[6226] = {
itemId = 2480,
itemPos = { x = 32231, y = 31068, z = 7 },
itemPos = { x = 32231, y = 31061, z = 7 },
container = 7342,
reward = { { 7365, 100 }, { 3450, 200 }, { 11605, 1 }, { 11615, 1 } },
weight = 270.40,
Expand Down
2 changes: 1 addition & 1 deletion src/game/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7742,7 +7742,7 @@ void Game::applyManaLeech(
// Void charm rune
if (targetMonster) {
if (uint16_t playerCharmRaceidVoid = attackerPlayer->parseRacebyCharm(CHARM_VOID, false, 0);
playerCharmRaceidVoid != 0 && playerCharmRaceidVoid == targetMonster->getRace()) {
playerCharmRaceidVoid != 0 && playerCharmRaceidVoid == targetMonster->getRaceId()) {
if (const auto charm = g_iobestiary().getBestiaryCharm(CHARM_VOID)) {
manaSkill += charm->percent;
}
Expand Down

0 comments on commit 2d8caa1

Please sign in to comment.