Mercurial > wow > cyborg-mmo7
comparison RatPageController.lua @ 25:b7074b47cfc7
Simplified the object system of the WowObject-s.
| author | madcatzinc@35b17cf1-18cd-47ff-9ca3-31d6b526ef09 |
|---|---|
| date | Thu, 25 Apr 2013 01:30:46 +0000 |
| parents | cccc7661a2e6 |
| children | 6ce173840e68 |
comparison
equal
deleted
inserted
replaced
| 24:6906d8ffd580 | 25:b7074b47cfc7 |
|---|---|
| 34 local slotObject = nil | 34 local slotObject = nil |
| 35 slotObject = CyborgMMO_RatPageModel:GetObjectOnButton(slot.Id) | 35 slotObject = CyborgMMO_RatPageModel:GetObjectOnButton(slot.Id) |
| 36 CyborgMMO_RatPageModel:SetObjectOnButton(slot.Id, CyborgMMO_RatPageModel:GetMode(), self:GetCursorObject()) | 36 CyborgMMO_RatPageModel:SetObjectOnButton(slot.Id, CyborgMMO_RatPageModel:GetMode(), self:GetCursorObject()) |
| 37 | 37 |
| 38 if slotObject then | 38 if slotObject then |
| 39 slotObject.Pickup() | 39 slotObject:Pickup() |
| 40 end | 40 end |
| 41 end | 41 end |
| 42 | 42 |
| 43 function RatPageController_methods:ModeClicked(mode) | 43 function RatPageController_methods:ModeClicked(mode) |
| 44 CyborgMMO_DPrint("Setting mode "..tostring(mode.Id)) | 44 CyborgMMO_DPrint("Setting mode "..tostring(mode.Id)) |
| 46 end | 46 end |
| 47 | 47 |
| 48 function RatPageController_methods:GetCursorObject() | 48 function RatPageController_methods:GetCursorObject() |
| 49 local cursorObject = nil | 49 local cursorObject = nil |
| 50 if GetCursorInfo() then | 50 if GetCursorInfo() then |
| 51 local type,detail,subdetail = GetCursorInfo() | 51 cursorObject = CyborgMMO_CreateWowObject(GetCursorInfo()) |
| 52 cursorObject = CyborgMMO_WowObject.Create(type, detail, subdetail) | |
| 53 ClearCursor() | 52 ClearCursor() |
| 54 end | 53 end |
| 55 return cursorObject | 54 return cursorObject |
| 56 end | 55 end |
| 57 | 56 |
