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

fix: mapmarks images order #539

Merged
merged 1 commit into from
May 20, 2023
Merged

fix: mapmarks images order #539

merged 1 commit into from
May 20, 2023

Conversation

yrpen
Copy link
Contributor

@yrpen yrpen commented May 20, 2023

Description

Map marks images had wrong order. I compared it with TFS 1.4.2 and OTC source code. I also tested adding them on mini map.
Before change map mark with id greather than 7 was displayed with wrong graphic.

Comments show what kind of image OTC have in this repo tied to this id before change.

MAPMARK_TICK = 0
MAPMARK_QUESTION = 1
MAPMARK_EXCLAMATION = 2
MAPMARK_STAR = 3
MAPMARK_CROSS = 4
MAPMARK_TEMPLE = 5
MAPMARK_KISS = 6
-- above are ok
MAPMARK_SHOVEL = 7 -- red north
MAPMARK_SWORD = 8 -- red east
MAPMARK_FLAG = 9 -- green north
MAPMARK_LOCK = 10 -- shovel
MAPMARK_BAG = 11 -- sword
MAPMARK_SKULL = 12 -- flag
MAPMARK_DOLLAR = 13 -- lock
MAPMARK_RED_NORTH = 14 -- bag
MAPMARK_RED_SOUTH = 15 -- skull
MAPMARK_RED_EAST = 16 -- dollar
MAPMARK_RED_WEST = 17 -- red south
MAPMARK_GREEN_NORTH = 18 -- red west
MAPMARK_GREEN_SOUTH = 19 -- green south

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested

I added map marks and checked them on client side.

local mapMarks = {
        {position = {x = 21, y = 19, z = 7}, type = MAPMARK_TEMPLE, description = "Temple"},
        {position = {x = 34, y = 118, z = 7}, type = MAPMARK_BAG, description = "Deposit"},
        {position = {x = 54, y = 23, z = 7}, type = MAPMARK_FLAG, description = "Fruits"},

        {position = {x = 50, y = 111, z = 7}, type = MAPMARK_LOCK, description = "Guild - Sorcerer"},
        {position = {x = 75, y = 137, z = 7}, type = MAPMARK_LOCK, description = "Guild - Druid"},
        {position = {x = 33, y = 65, z = 7}, type = MAPMARK_LOCK, description = "Guild - Paladin"},
        {position = {x = 118, y = 109, z = 7}, type = MAPMARK_LOCK, description = "Guild - Knight"},

        {position = {x = 44, y = 11, z = 7}, type = MAPMARK_SHOVEL, description = "Fishing rod"},
        {position = {x = 44, y = 40, z = 7}, type = MAPMARK_SHOVEL, description = "Knife"},
        {position = {x = 56, y = 41, z = 7}, type = MAPMARK_SHOVEL, description = "Scythe"},
        {position = {x = 44, y = 49, z = 7}, type = MAPMARK_SHOVEL, description = "Carpenter hammer"},
        {position = {x = 86, y = 42, z = 7}, type = MAPMARK_SHOVEL, description = "Shovel"},
        {position = {x = 35, y = 58, z = 7}, type = MAPMARK_SHOVEL, description = "Small axe"},
        {position = {x = 106, y = 81, z = 6}, type = MAPMARK_SHOVEL, description = "Machete"}
}

local firstLogin = CreatureEvent("firstlogin")
firstLogin:type("login")

function firstLogin.onLogin(player)
	for i = 1, #mapMarks do
		player:addMapMark(mapMarks[i].position, mapMarks[i].type, mapMarks[i].description)
	end
	return true
end

firstLogin:register()

Test Configuration:

  • Server Version: TFS 1.4.2
  • Client: OTC commit 3282896
  • Operating System: Ubuntu 20.04

Checklist

  • I have performed a self-review of my own code
  • I checked the PR checks reports
  • My changes generate no new warnings

@mehah mehah changed the title fix mapmarks images order fix: mapmarks images order May 20, 2023
@mehah mehah merged commit 47a3e59 into mehah:main May 20, 2023
dudantas pushed a commit that referenced this pull request Nov 17, 2023
Convinced creature should attack same target as master
Fixes #539
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants