Skip to content

Commit

Permalink
reset files
Browse files Browse the repository at this point in the history
  • Loading branch information
pudimtibia committed Jan 23, 2025
1 parent 313d16d commit ba4c455
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 62 deletions.
3 changes: 0 additions & 3 deletions data/scripts/lib/register_monster_type.lua
Original file line number Diff line number Diff line change
Expand Up @@ -901,9 +901,6 @@ function readSpell(incomingLua, mtype)
if incomingLua.chance then
spell:setChance(incomingLua.chance)
end
if incomingLua.group then
spell:setGroup(incomingLua.group)
end
if incomingLua.range then
spell:setRange(incomingLua.range)
end
Expand Down
1 change: 0 additions & 1 deletion src/creatures/monsters/monsters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ bool Monsters::deserializeSpell(const std::shared_ptr<MonsterSpell> &spell, spel

sb.speed = spell->interval;
sb.chance = std::min(static_cast<int>(spell->chance), 100);
sb.group = spell->group > 0 ? spell->group : 0;
sb.range = std::min(static_cast<int>(spell->range), MAP_MAX_VIEW_PORT_X * 2);
sb.minCombatValue = std::min(spell->minCombatValue, spell->maxCombatValue);
sb.maxCombatValue = std::max(spell->minCombatValue, spell->maxCombatValue);
Expand Down
4 changes: 0 additions & 4 deletions src/creatures/monsters/monsters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ struct spellBlock_t {
spellBlock_t(spellBlock_t &&other) noexcept :
spell(std::move(other.spell)),
chance(other.chance),
group(other.group),
speed(other.speed),
range(other.range),
minCombatValue(other.minCombatValue),
Expand All @@ -49,7 +48,6 @@ struct spellBlock_t {

std::shared_ptr<BaseSpell> spell = nullptr;
uint32_t chance = 100;
uint32_t group = MonsterSpellGroup_t::MONSTER_SPELL_GROUP_DEFAULT;
uint32_t speed = 2000;
uint32_t range = 0;
int32_t minCombatValue = 0;
Expand Down Expand Up @@ -165,7 +163,6 @@ class MonsterType {
bool isForgeCreature = true;
bool isPreyable = true;
bool isPreyExclusive = false;
bool hasGroupedSpells = false;

MonstersEvent_t eventType = MONSTERS_EVENT_NONE;
};
Expand Down Expand Up @@ -233,7 +230,6 @@ class MonsterSpell {
int32_t tickInterval = 0;
int32_t speedChange = 0;
int32_t duration = 0;
int32_t group = 0;

bool isScripted = false;
bool needTarget = false;
Expand Down
10 changes: 0 additions & 10 deletions src/lua/functions/core/game/lua_enums.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ void LuaEnums::init(lua_State* L) {
initWheelEnums(L);
initAttributeConditionSubIdEnums(L);
initConcoctionsEnum(L);
initMonsterSpellGroupEnums(L);
}

void LuaEnums::initOthersEnums(lua_State* L) {
Expand Down Expand Up @@ -1807,12 +1806,3 @@ void LuaEnums::initWheelEnums(lua_State* L) {
registerMagicEnumNamespace(L, wheelNamespace, value);
}
}

void LuaEnums::initMonsterSpellGroupEnums(lua_State* L) {
registerEnum(L, MONSTER_SPELL_GROUP_DEFAULT);
registerEnum(L, MONSTER_SPELL_GROUP_BASIC);
registerEnum(L, MONSTER_SPELL_GROUP_ATTACK);
registerEnum(L, MONSTER_SPELL_GROUP_DRAIN);
registerEnum(L, MONSTER_SPELL_GROUP_TRANSFORM);
registerEnum(L, MONSTER_SPELL_GROUP_STATUS);
}
1 change: 0 additions & 1 deletion src/lua/functions/core/game/lua_enums.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,4 @@ class LuaEnums {
static void monsterSoundEnums(lua_State* L);
static void effectsSoundEnums(lua_State* L);
static void initWheelEnums(lua_State* L);
static void initMonsterSpellGroupEnums(lua_State* L);
};
13 changes: 0 additions & 13 deletions src/lua/functions/creatures/monster/monster_spell_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ void MonsterSpellFunctions::init(lua_State* L) {
Lua::registerMethod(L, "MonsterSpell", "setType", MonsterSpellFunctions::luaMonsterSpellSetType);
Lua::registerMethod(L, "MonsterSpell", "setScriptName", MonsterSpellFunctions::luaMonsterSpellSetScriptName);
Lua::registerMethod(L, "MonsterSpell", "setChance", MonsterSpellFunctions::luaMonsterSpellSetChance);
Lua::registerMethod(L, "MonsterSpell", "setGroup", MonsterSpellFunctions::luaMonsterSpellSetGroup);
Lua::registerMethod(L, "MonsterSpell", "setInterval", MonsterSpellFunctions::luaMonsterSpellSetInterval);
Lua::registerMethod(L, "MonsterSpell", "setRange", MonsterSpellFunctions::luaMonsterSpellSetRange);
Lua::registerMethod(L, "MonsterSpell", "setCombatValue", MonsterSpellFunctions::luaMonsterSpellSetCombatValue);
Expand Down Expand Up @@ -96,18 +95,6 @@ int MonsterSpellFunctions::luaMonsterSpellSetInterval(lua_State* L) {
return 1;
}

int MonsterSpellFunctions::luaMonsterSpellSetGroup(lua_State* L) {
// monsterSpell:setGroup(group)
const auto &spell = Lua::getUserdataShared<MonsterSpell>(L, 1);
if (spell) {
spell->group = Lua::getNumber<uint16_t>(L, 2);
Lua::pushBoolean(L, true);
} else {
lua_pushnil(L);
}
return 1;
}

int MonsterSpellFunctions::luaMonsterSpellSetRange(lua_State* L) {
// monsterSpell:setRange(range)
const auto &spell = Lua::getUserdataShared<MonsterSpell>(L, 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class MonsterSpellFunctions {
static int luaMonsterSpellSetType(lua_State* L);
static int luaMonsterSpellSetScriptName(lua_State* L);
static int luaMonsterSpellSetChance(lua_State* L);
static int luaMonsterSpellSetGroup(lua_State* L);
static int luaMonsterSpellSetInterval(lua_State* L);
static int luaMonsterSpellSetRange(lua_State* L);
static int luaMonsterSpellSetCombatValue(lua_State* L);
Expand Down
18 changes: 0 additions & 18 deletions src/lua/functions/creatures/monster/monster_type_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ void MonsterTypeFunctions::init(lua_State* L) {
Lua::registerMethod(L, "MonsterType", "canWalkOnFire", MonsterTypeFunctions::luaMonsterTypeCanWalkOnFire);
Lua::registerMethod(L, "MonsterType", "canWalkOnPoison", MonsterTypeFunctions::luaMonsterTypeCanWalkOnPoison);

Lua::registerMethod(L, "MonsterType", "hasGroupedSpells", MonsterTypeFunctions::luaMonsterTypeHasGroupedSpells);

Lua::registerMethod(L, "MonsterType", "strategiesTargetNearest", MonsterTypeFunctions::luaMonsterTypeStrategiesTargetNearest);
Lua::registerMethod(L, "MonsterType", "strategiesTargetHealth", MonsterTypeFunctions::luaMonsterTypeStrategiesTargetHealth);
Lua::registerMethod(L, "MonsterType", "strategiesTargetDamage", MonsterTypeFunctions::luaMonsterTypeStrategiesTargetDamage);
Expand Down Expand Up @@ -1600,22 +1598,6 @@ int MonsterTypeFunctions::luaMonsterTypeCanWalkOnPoison(lua_State* L) {
return 1;
}

int MonsterTypeFunctions::luaMonsterTypeHasGroupedSpells(lua_State* L) {
// get: monsterType:hasGroupedSpells() set: monsterType:hasGroupedSpells(bool)
const auto &monsterType = Lua::getUserdataShared<MonsterType>(L, 1);
if (monsterType) {
if (lua_gettop(L) == 1) {
Lua::pushBoolean(L, monsterType->info.hasGroupedSpells);
} else {
monsterType->info.hasGroupedSpells = Lua::getBoolean(L, 2, true);
Lua::pushBoolean(L, true);
}
} else {
lua_pushnil(L);
}
return 1;
}

int MonsterTypeFunctions::luaMonsterTypeStrategiesTargetNearest(lua_State* L) {
// monsterType:strategiesTargetNearest()
const auto &monsterType = Lua::getUserdataShared<MonsterType>(L, 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ class MonsterTypeFunctions {
static int luaMonsterTypeCanWalkOnFire(lua_State* L);
static int luaMonsterTypeCanWalkOnPoison(lua_State* L);

static int luaMonsterTypeHasGroupedSpells(lua_State* L);

static int luaMonsterTypeStrategiesTargetNearest(lua_State* L);
static int luaMonsterTypeStrategiesTargetHealth(lua_State* L);
static int luaMonsterTypeStrategiesTargetDamage(lua_State* L);
Expand Down
9 changes: 0 additions & 9 deletions src/utils/utils_definitions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -742,12 +742,3 @@ enum Screenshot_t : uint8_t {
SCREENSHOT_TYPE_SKILLUP = 12,
SCREENSHOT_TYPE_GIFTOFLIFE = 13,
};

enum MonsterSpellGroup_t : uint8_t {
MONSTER_SPELL_GROUP_DEFAULT = 0,
MONSTER_SPELL_GROUP_BASIC = 1, // Basic attacks, such as melee or ranged
MONSTER_SPELL_GROUP_ATTACK = 2, // Offensive spells like energy beams or fireballs
MONSTER_SPELL_GROUP_DRAIN = 3, // Spells for resource draining, e.g., mana drain
MONSTER_SPELL_GROUP_TRANSFORM = 4, // Spells that change appearance or looktype
MONSTER_SPELL_GROUP_STATUS = 5, // Special conditions like fear, root, or drunk
};

0 comments on commit ba4c455

Please sign in to comment.