Fixed #165, Fine tune fixes!

* Fixed an issue with the cooldown timing.
* Fixed issue with 'right click' using items under players.
* Some changes to the minimap control (ctrl + mouse wheel to
  change floors and tweaked the zoom/move speeds).
* Fixed some bugs in the trade module.
* Added new Spells table for spell related functions
  (Also added getSpellByName and getSpellByWords).
* Fixed an issue with follow/attack cancelling (wasn't calling
  onFollowChanged for updates in battle, etc).
This commit is contained in:
BeniS
2013-01-07 04:04:49 +13:00
parent 3fa5993177
commit fddbafebd3
8 changed files with 124 additions and 66 deletions

View File

@@ -95,9 +95,12 @@ function bindKeys()
end
function terminate()
disconnect(g_game, { onGameStart = show,
onGameEnd = hide,
onLoginAdvice = onLoginAdvice })
disconnect(g_game, {
onGameStart = show,
onGameEnd = hide,
onLoginAdvice = onLoginAdvice
})
disconnect(gameLeftPanel, { onVisibilityChange = onLeftPanelVisibilityChange })
logoutButton:destroy()
@@ -475,6 +478,8 @@ function processMouseAction(menuPosition, mouseButton, autoWalkPos, lookThing, u
g_game.attack(creatureThing)
return true
end
-- classic control
else
if multiUseThing and keyboardModifiers == KeyboardNoModifier and mouseButton == MouseRightButton and not g_mouse.isPressed(MouseLeftButton) then
local player = g_game.getLocalPlayer()
@@ -493,14 +498,14 @@ function processMouseAction(menuPosition, mouseButton, autoWalkPos, lookThing, u
startUseWith(useThing)
return true
else
g_game.use(multiUseThing)
g_game.use(useThing)
end
return true
elseif lookThing and keyboardModifiers == KeyboardShiftModifier and (mouseButton == MouseLeftButton or mouseButton == MouseRightButton) then
g_game.look(lookThing)
return true
elseif lookThing and ((g_mouse.isPressed(MouseLeftButton) and mouseButton == MouseRightButton) or (g_mouse.isPressed(MouseRightButton) and mouseButton == MouseLeftButton)) then
g_game.look(lookThing)
g_game.look(lookThing)
return true
elseif useThing and keyboardModifiers == KeyboardCtrlModifier and (mouseButton == MouseLeftButton or mouseButton == MouseRightButton) then
createThingMenu(menuPosition, lookThing, useThing, creatureThing)