Download
(168Kb)
Download
Updated: 12-28-10 03:41 PM
Patch for:
HandyNotes.
Pictures
File Info
Updated:12-28-10 03:41 PM
Created:12-14-10 08:13 AM
Downloads:3,248
Favorites:16
MD5:

HandyNotes (tempfix)

Version: 1.1.6c
by: Isharra [More]

The official HandyNotes release is out! It is version 1.2.0 so there should be no confusion when you upgrade. And please do go back to the official HandyNotes! I hope this addon helped you out.

All current work on the tempfix is halted.


This is a temporary patch for HandyNotes to work around the problems I was seeing with WoW patch 4.0.3a. The original HandyNotes 1.1.6 is available on Curse and WowInterface.

Cladhaire's changes to TomTom were incorporated so that Astrolabe 1.0 is used. This means that additional HandyNotes addons still need to be fixed separately if they call Astrolabe 0.4 themselves (see below.) If it works, Cladhaire deserves all the credit.

There is another attempt at a workaround HandyNotes (fanupdate) while it didn't solve my problem it should still work with the other HandyNotes addons as it was using Astrolabe-0.4 last I checked.

This is not intended as a fork in the codebase, just a workaround until the base addon is updated by the author.

Use /handynotes to access options.

You can add notes to the maps in 3 ways:

  • Alt-RightClick on the world map to add a note.
  • Use "/hnnew" without the quotes to add a note at your current location.
  • Use "/hnnew x,y" without the quotes to add a note at location x,y on your current zone's map.

The additional HandyNotes_* plugins won't work with this tempfix without being modified. Using these instructions with the official HandyNotes 1.1.6 won't work either. The FAQ changes should work with HandyNotes 1.2.0 when it's released as it will use Astrolabe-1.0.

See the FAQ for instructions on how to modify your HandyNotes_* plugins that aren't working.

Download the latest versions of SilverDragon, HandyNotes_Trainers, HandyNotes_Vendors and HandyNotes_Guild. They have been updated to work with HandyNotes 1.2.0.

Minimal testing with HandyNotes_SpecialNPCsEtc, HandyNotes_Charon and HandyNotes_Mailboxes since I don't use them normally but they load without error and seem to be adding the icons properly. HandyNotes_Mailboxes (tempfix) I've uploaded since I had to test the compat function changes required to support it.

rev 1.1.6c added "compat.IconsOnEdge = Astrolabe.IconsOnEdge" to hopefully fix icon on edge problem with the minimap.

rev 1.16b add functions to compat section to support HandyNotes_Mailboxes

rev 1.16a update Astrolabe-1.0 to r125

rev 1.16 initial release - Astrolabe-1.0 r123
Post A Reply Comment Options
Unread 12-22-10, 07:33 PM  
mooch360
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
Originally posted by Isharra
Ok, color me confused. I deleted my folders, installed from the copies I downloaded and it still works for me!

Are you using other HandyNotes addons and if so which ones?

I'll go ahead and post a version with the whole compat section copied over if that's what it takes but it shouldn't be needed. sigh
I'm also using CityGuide, Vendors, and Trainers, modified as per Toran's info. If no one else is having a problem maybe it was just me.
Report comment to moderator  
Reply With Quote
Unread 12-22-10, 07:30 PM  
Isharra
A Defias Bandit
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 37
Uploads: 2
Originally posted by Toran
Edit: You have the right one.

I think the latest HandyNotes_Mailboxes is over at wowace - make sure you are using that one. I haven't tested, just offering it up as a possible solution.
Yes, that's the one I tried to update to use Astrolabe-1.0.
Report comment to moderator  
Reply With Quote
Unread 12-22-10, 07:23 PM  
Isharra
A Defias Bandit
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 37
Uploads: 2
Originally posted by mooch360
Yes, that line is there.

Edit:

I fixed it!

I modified HandyNotes_Mailboxes.lua (using your revised version as the base) by followed Toran's instructions on his blog and pasted in the ComputeDistance function from your HandyNotes.lua

(so it starts like this)


I'm also using your new HandyNotes 1.16b.
Not sure why it didn't work the way you did it, but it works now!
Ok, color me confused. I deleted my folders, installed from the copies I downloaded and it still works for me!

Are you using other HandyNotes addons and if so which ones?

I'll go ahead and post a version with the whole compat section copied over if that's what it takes but it shouldn't be needed. sigh
Last edited by Isharra : 12-22-10 at 07:27 PM.
Report comment to moderator  
Reply With Quote
Unread 12-22-10, 06:48 PM  
mooch360
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
Originally posted by Isharra
If it is, I need to try and find out what the problem is. If it isn't then you either didn't update or WoW Interface gave you the older file (I just downloaded to check I did post the correct version and it did have the changes.) [/b]
Yes, that line is there.

Edit:

I fixed it!

I modified HandyNotes_Mailboxes.lua (using your revised version as the base) by followed Toran's instructions on his blog and pasted in the ComputeDistance function from your HandyNotes.lua

(so it starts like this)

---------------------------------------------------------
-- Addon declaration
HandyNotes_Mailboxes = LibStub("AceAddon-3.0"):NewAddon("HandyNotes_Mailboxes","AceEvent-3.0")
local HMB = HandyNotes_Mailboxes
local HandyNotes = LibStub("AceAddon-3.0"):GetAddon("HandyNotes")
local Astrolabe = DongleStub("Astrolabe-1.0")
local GameVersion = select(4, GetBuildInfo())
--local L = LibStub("AceLocale-3.0"):GetLocale("HandyNotes_Mailboxes", false)


local compat = {}
HandyNotes.compat = compat

do
local orig = GetCurrentMapAreaID()

-- Create a lookup table from mapID to c,z pairs
local mapcz = {}
for cid, zlist in ipairs{GetMapContinents()} do
for zid, mapid in ipairs{GetMapZones(cid)} do
SetMapZoom(cid, zid)
local mapid = GetCurrentMapAreaID()
mapcz[mapid] = {cid, zid}
end
end

SetMapByID(orig)

-- Speed up minimap updates
Astrolabe.MinimapUpdateTime = 0.1

-- This function takes the mapID return from the Astrolabe function
-- and converts it to a c,z,x,y tuple
function compat:GetCurrentPlayerPosition()
local map, floor, x, y = Astrolabe:GetCurrentPlayerPosition()
local cz = mapcz[map]
if cz then
local c, z = unpack(cz)
return c, z, x, y
end
end

function compat:GetCurrentPlayerCoords()
local map, floor, x, y = Astrolabe:GetCurrentPlayerPosition()
return x, y
end

function compat:GetDirectionToIcon(...)
return Astrolabe:GetDirectionToIcon(...)
end

function compat:GetDistanceToIcon(...)
return Astrolabe:GetDistanceToIcon(...)
end

function compat:RemoveIconFromMinimap(...)
return Astrolabe:RemoveIconFromMinimap(...)
end

function compat:IsIconOnEdge(...)
return Astrolabe:IsIconOnEdge(...)
end

function compat:PlaceIconOnMinimap(icon, c, z, x, y)
local mapId = Astrolabe:GetMapID(c, z)
local floors = Astrolabe:GetNumFloors(mapId)
local floor = floors == 0 and 0 or 1
return Astrolabe:PlaceIconOnMinimap(icon, mapId, floor, x, y)
end

function compat:PlaceIconOnWorldMap(frame, icon, c, z, x, y)
local mapId = Astrolabe:GetMapID(c, z)
local floors = Astrolabe:GetNumFloors(mapId)
local floor = floors == 0 and 0 or 1

return Astrolabe:PlaceIconOnWorldMap(frame, icon, mapId, floor, x, y)
end


function compat:ComputeDistance(c1,z1,x1,y1,c2,z2,x2,y2)
local m1 = Astrolabe:GetMapID(c1, z1)
local floors = Astrolabe:GetNumFloors(m1)
local f1 = floors == 0 and 0 or 1
local m2 = Astrolabe:GetMapID(c2, z2)
floors = Astrolabe:GetNumFloors(m2)
local f2 = floors == 0 and 0 or 1
return Astrolabe:ComputeDistance(m1, f1, x1, y1, m2, f2, x2, y2)
end

end
I'm also using your new HandyNotes 1.16b.
Not sure why it didn't work the way you did it, but it works now!
Last edited by mooch360 : 12-22-10 at 07:11 PM.
Report comment to moderator  
Reply With Quote
Unread 12-22-10, 06:09 PM  
Toran
A Nerdscale Dorkin
 
Toran's Avatar
Premium Member

Forum posts: 143
File comments: 433
Uploads: 0
Edit: You have the right one.

I think the latest HandyNotes_Mailboxes is over at wowace - make sure you are using that one. I haven't tested, just offering it up as a possible solution.
Last edited by Toran : 12-22-10 at 06:38 PM.
Report comment to moderator  
Reply With Quote
Unread 12-22-10, 02:53 PM  
Isharra
A Defias Bandit
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 37
Uploads: 2
Originally posted by mooch360
I got a lua error as soon as it tried to add a note:
HandyNotes_Mailboxes.lua line 188: attempt to call method 'ComputeDistance' (a nil value)

It didn't delete the old one though.

I installed the updated HandyNotes 1.16b and HandyNotes_Mailboxes above.
Thanks for the feedback!

I can't duplicate it! It acts as if HandyNotes is not updated. Do me a favor and check HandyNotes.lua (from HandyNotes directory) and see if at line 85 the function is defined
Code:
function compat:ComputeDistance(c1,z1,x1,y1,c2,z2,x2,y2)
If it is, I need to try and find out what the problem is. If it isn't then you either didn't update or WoW Interface gave you the older file (I just downloaded to check I did post the correct version and it did have the changes.)
Report comment to moderator  
Reply With Quote
Unread 12-22-10, 02:39 PM  
mooch360
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
Originally posted by Isharra
I've uploaded a new release of HandyNotes (tempfix) 1.16b with the added compat call to support HandyNotes_Mailboxes (and general Astrolabe cleanup.)

added HandyNotes_Mailboxes (tempfix) so you don't have to type out the changes yourselves.

Please let me know if it works or causes problems (I don't normally use it since my city maps become flooded in mailbox icons.)
I got a lua error as soon as it tried to add a note:
HandyNotes_Mailboxes.lua line 188: attempt to call method 'ComputeDistance' (a nil value)

It didn't delete the old one though.

I installed the updated HandyNotes 1.16b and HandyNotes_Mailboxes above.
Last edited by mooch360 : 12-22-10 at 02:40 PM.
Report comment to moderator  
Reply With Quote
Unread 12-22-10, 10:59 AM  
Isharra
A Defias Bandit
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 37
Uploads: 2
Originally posted by Isharra
handynotes_mailboxes has an additional call to Astrolabe:ComputeDistance, (which isn't added in the compat functions yet.) I'll try to work on this tonight or tomorrow once server maintenance is over.

I've uploaded a new release of HandyNotes (tempfix) 1.16b with the added compat call to support HandyNotes_Mailboxes (and general Astrolabe cleanup.)

added HandyNotes_Mailboxes (tempfix) so you don't have to type out the changes yourselves.

Please let me know if it works or causes problems (I don't normally use it since my city maps become flooded in mailbox icons.)
Last edited by Isharra : 12-22-10 at 11:04 AM.
Report comment to moderator  
Reply With Quote
Unread 12-22-10, 07:55 AM  
Isharra
A Defias Bandit
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 37
Uploads: 2
Originally posted by -Raz-
was going to wait for the original author to put out an update, but had quite a few out of memory wow crashes lately

so gave this a try and havent had a single crash again, i guess wow doesnt like when you got 20+ icons glued to the minimap player arrow
I'm thrilled it's working for you!

I really appreciate the input everyone especially since there were no comments the first couple of days. I was afraid it only worked for me.

Sariktor, thanks so much for the work pointing out the fixes in the additional HandyNotes addons (I don't use them myself so I couldn't test reliably.)

Originally posted by Sariktor
Oh.. it's missing the workaround... Open HandyNotes_SpecialNPCsEtc\HandyNotes_SpecialNPCsEtc.lua and add this near the top.

It shouldn't be necessary to add the whole compat section, just reference it in the other addons. change
Code:
local HandyNotes = LibStub("AceAddon-3.0"):GetAddon("HandyNotes")
local Astrolabe = DongleStub("Astrolabe-0.4")
to
Code:
local HandyNotes = LibStub("AceAddon-3.0"):GetAddon("HandyNotes")
local compat = {}
compat = HandyNotes.compat
Obviously if the addon uses HN (or any other name) instead of "HandyNotes" as the variable name make the appropriate switch with compat. The advantage/disadvantage of this is that if compat changes in HandyNotes it's automatically updated in the other addons.

Then make the standard

Code:
Astrolabe:GetCurrentPlayerPosition()
to
Code:
compat:GetCurrentPlayerPosition()

Any other Astrolabe calls in the addons will also need to be updated.

handynotes_mailboxes has an additional call to Astrolabe:ComputeDistance, (which isn't added in the compat functions yet.) I'll try to work on this tonight or tomorrow once server maintenance is over.


And sorry for the delay in responding folks, I got Isharra to level 85, another to 83 and two more to level 82 since I posted this.

I need to kick my WoWInterface settings, I'm not receiving the email notifications I'm supposed to get when people leave a comment.
Last edited by Isharra : 12-23-10 at 01:47 AM.
Report comment to moderator  
Reply With Quote
Unread 12-22-10, 04:50 AM  
-Raz-
A Kobold Labourer
 
-Raz-'s Avatar

Forum posts: 0
File comments: 49
Uploads: 0
was going to wait for the original author to put out an update, but had quite a few out of memory wow crashes lately

so gave this a try and havent had a single crash again, i guess wow doesnt like when you got 20+ icons glued to the minimap player arrow
Report comment to moderator  
Reply With Quote
Unread 12-21-10, 11:00 PM  
Toran
A Nerdscale Dorkin
 
Toran's Avatar
Premium Member

Forum posts: 143
File comments: 433
Uploads: 0
Originally posted by mooch360
I'm still having a problem specific to (it seems) handynotes_mailboxes, and only in the main cities. When I click on a mailbox, it deletes my previously marked mailbox and adds the new one. Any idea how to fix this bug?
Likewise - nice catch.
Report comment to moderator  
Reply With Quote
Unread 12-21-10, 07:11 PM  
mooch360
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
I'm still having a problem specific to (it seems) handynotes_mailboxes, and only in the main cities. When I click on a mailbox, it deletes my previously marked mailbox and adds the new one. Any idea how to fix this bug?
Report comment to moderator  
Reply With Quote
Unread 12-21-10, 03:13 PM  
Davidious84
A Defias Bandit

Forum posts: 2
File comments: 3
Uploads: 0
wOOt! it works beautifully! thank you so much! =D
Report comment to moderator  
Reply With Quote
Unread 12-21-10, 12:45 PM  
Sariktor
A Kobold Labourer

Forum posts: 0
File comments: 8
Uploads: 0
Originally posted by Davidious84
I added the temp fix that you guys had posted here but it doesn't seem to work and I get the Error:

Date: 2010-12-20 14:46:07
ID: 1
Error occured in: Global
Count: 1
Message: ...dyNotes_SpecialNPCsEtc\HandyNotes_SpecialNPCsEtc.lua line 916:
attempt to index global 'compat' (a nil value)
Debug:
(tail call): ?
...dyNotes_SpecialNPCsEtc\HandyNotes_SpecialNPCsEtc.lua:916: AddSpecialNPCsEtcNote()
...dyNotes_SpecialNPCsEtc\HandyNotes_SpecialNPCsEtc.lua:900: Opened_NPC()
...dyNotes_SpecialNPCsEtc\HandyNotes_SpecialNPCsEtc.lua:682: ?()
...ore\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:147:
...ore\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:147
[string "safecall Dispatcher[1]"]:4:
[string "safecall Dispatcher[1]"]:4
[C]: ?
[string "safecall Dispatcher[1]"]:13: ?()
...ore\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:92: Fire()
...\AddOns\DataStore\libs\AceEvent-3.0\AceEvent-3.0.lua:120:
...\AddOns\DataStore\libs\AceEvent-3.0\AceEvent-3.0.lua:119


Any help would be appreciated! thank you again for your time!.

The addon i'm using with handy notes is "Handy notes Special Npc etc" found at http://wow.curse.com/downloads/wow-a...alnpcsetc.aspx
Was using this addon cause it seemed to do the work all the others did just all wrapped up into 1. Again any help would be appreciated.

Oh.. it's missing the workaround... Open HandyNotes_SpecialNPCsEtc\HandyNotes_SpecialNPCsEtc.lua and add this near the top.
Code:
local compat = {}
HandyNotes.compat = compat

do
    local orig = GetCurrentMapAreaID()

    -- Create a lookup table from mapID to c,z pairs
    local mapcz = {}
    for cid, zlist in ipairs{GetMapContinents()} do
        for zid, mapid in ipairs{GetMapZones(cid)} do
            SetMapZoom(cid, zid)
            local mapid = GetCurrentMapAreaID()
            mapcz[mapid] = {cid, zid}
        end
    end

    SetMapByID(orig)

    -- Speed up minimap updates
    Astrolabe.MinimapUpdateTime = 0.1

    -- This function takes the mapID return from the Astrolabe function
    -- and converts it to a c,z,x,y tuple
    function compat:GetCurrentPlayerPosition()
        local map, floor, x, y = Astrolabe:GetCurrentPlayerPosition()
        local cz = mapcz[map]
        if cz then
            local c, z = unpack(cz)
            return c, z, x, y
        end
    end

    function compat:GetCurrentPlayerCoords()
        local map, floor, x, y = Astrolabe:GetCurrentPlayerPosition()
        return x, y
    end

    function compat:GetDirectionToIcon(...)
        return Astrolabe:GetDirectionToIcon(...)
    end

    function compat:GetDistanceToIcon(...)
        return Astrolabe:GetDistanceToIcon(...)
    end

    function compat:RemoveIconFromMinimap(...)
        return Astrolabe:RemoveIconFromMinimap(...)
    end

    function compat:IsIconOnEdge(...)
        return Astrolabe:IsIconOnEdge(...)
    end

    function compat:PlaceIconOnMinimap(icon, c, z, x, y)
        local mapId = Astrolabe:GetMapID(c, z)
        local floors = Astrolabe:GetNumFloors(mapId)
        local floor = floors == 0 and 0 or 1
        return Astrolabe:PlaceIconOnMinimap(icon, mapId, floor, x, y)
    end

    function compat:PlaceIconOnWorldMap(frame, icon, c, z, x, y)
        local mapId = Astrolabe:GetMapID(c, z)
        local floors = Astrolabe:GetNumFloors(mapId)
        local floor = floors == 0 and 0 or 1

        return Astrolabe:PlaceIconOnWorldMap(frame, icon, mapId, floor, x, y)
    end

end
Save and test. This should correct the error.
Report comment to moderator  
Reply With Quote
Unread 12-20-10, 01:59 PM  
Davidious84
A Defias Bandit

Forum posts: 2
File comments: 3
Uploads: 0
I added the temp fix that you guys had posted here but it doesn't seem to work and I get the Error:

Date: 2010-12-20 14:46:07
ID: 1
Error occured in: Global
Count: 1
Message: ...dyNotes_SpecialNPCsEtc\HandyNotes_SpecialNPCsEtc.lua line 916:
attempt to index global 'compat' (a nil value)
Debug:
(tail call): ?
...dyNotes_SpecialNPCsEtc\HandyNotes_SpecialNPCsEtc.lua:916: AddSpecialNPCsEtcNote()
...dyNotes_SpecialNPCsEtc\HandyNotes_SpecialNPCsEtc.lua:900: Opened_NPC()
...dyNotes_SpecialNPCsEtc\HandyNotes_SpecialNPCsEtc.lua:682: ?()
...ore\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:147:
...ore\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:147
[string "safecall Dispatcher[1]"]:4:
[string "safecall Dispatcher[1]"]:4
[C]: ?
[string "safecall Dispatcher[1]"]:13: ?()
...ore\libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:92: Fire()
...\AddOns\DataStore\libs\AceEvent-3.0\AceEvent-3.0.lua:120:
...\AddOns\DataStore\libs\AceEvent-3.0\AceEvent-3.0.lua:119


Any help would be appreciated! thank you again for your time!.

The addon i'm using with handy notes is "Handy notes Special Npc etc" found at http://wow.curse.com/downloads/wow-addons/details/handynotes_specialnpcsetc.aspx
Was using this addon cause it seemed to do the work all the others did just all wrapped up into 1. Again any help would be appreciated.
Last edited by Davidious84 : 12-21-10 at 01:10 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: