Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game.createMonster is sending CONST_ME_TELEPORT magic effect to monster position when it's should be specified by the script instead #3905

Closed
2 tasks done
andremiles1 opened this issue Jan 24, 2022 · 1 comment · Fixed by #3914
Labels
decisions Debatable/disputable good first issue Issues that are easy to get started with priority: low Issues with this label won’t have the immediate focus

Comments

@andremiles1
Copy link
Contributor

andremiles1 commented Jan 24, 2022

Before creating an issue, please ensure:

  • This is a bug in the software that resides in this repository, and not a
    support matter (use https://otland.net/forums/support.16/ for support)
  • This issue is reproducible without changes to the C++ code in this repository

Steps to reproduce (include any configuration/script required to reproduce)

  1. Call a script that uses the command Game.createMonster alone.

Expected behaviour

Command Game.createMonster should only create the monster on map without any effect attached to it. Assuming a magic effect together hurts when it's not the case. If there's an occasion where you want to send a magic effect together with creating the monster, script should also include the following command sendMagicEffect(CONST_ME_TELEPORT) to monster's position, for example.
I am stating all of this because there's monsters on real server that are placed on map with no effect, or with other effects instead of the teleportation one.

Actual behaviour

Watch as the command automatically sends a magic effect CONST_ME_TELEPORT to monster position together as creating the monster.

Environment

Reproduction environment

Example script:
local pos = Position(500, 500, 7)
local monster = Game.createMonster("Rat", pos)
if monster then
monster:remove()
end

@EPuncker
Copy link
Contributor

Game.createMonster calls Game::placeCreature who calls Game::internalPlaceCreature who calls Map::placeCreature which calls ProtocolGame::sendAddCreature

and there it is:

		if (isLogin) {
			sendMagicEffect(pos, CONST_ME_TELEPORT);
		}

I'm not sure why it is there, but I agree we should remove it

PS: this one is for monsters/npcs only, the teleport effect for players is bellow

@EPuncker EPuncker added decisions Debatable/disputable good first issue Issues that are easy to get started with priority: low Issues with this label won’t have the immediate focus labels Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
decisions Debatable/disputable good first issue Issues that are easy to get started with priority: low Issues with this label won’t have the immediate focus
Projects
None yet
2 participants