Changeset 3210
- Timestamp:
- 01/13/10 21:20:57 (8 months ago)
- Location:
- trunk
- Files:
-
- 4 modified
-
lua/lib.2d.mousepick.lua (modified) (3 diffs)
-
lua/lib.cursor.lua (modified) (2 diffs)
-
lua/net/net.cursor.lua (modified) (2 diffs)
-
plugins/loot.lua (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lua/lib.2d.mousepick.lua
r3025 r3210 86 86 gMousePickFoundHit.hit_yloc = sprite.yloc or item.yloc 87 87 gMousePickFoundHit.hit_zloc = sprite.zloc or item.zloc 88 gMousePickFoundHit.hit_artid = sprite.artid or item.artid 88 89 --~ print("RayPickDynamics",GetStaticTileTypeName(sprite.data.artid)) 89 90 end … … 145 146 end 146 147 if (o.hittype == kMousePickHitType_Dynamic ) then 148 hitinfo = hitinfo..sprintf("packetid=0x%02x,",data.packetid or 0) 149 hitinfo = hitinfo..sprintf("itemclass=0x%02x,",data.itemclass or 0) 150 hitinfo = hitinfo..sprintf("amount2=0x%02x,",data.amount2 or 0) 151 hitinfo = hitinfo..sprintf("artid_base=0x%04x,",data.artid_base or 0) 147 152 hitinfo = hitinfo..sprintf("amount=0x%02x,",data.amount or 0) 148 153 end … … 150 155 if (o.hittype == kMousePickHitType_Static ) then hitinfo = hitinfo.."static" end 151 156 if (o.hittype == kMousePickHitType_Terrain ) then hitinfo = hitinfo.."terrain" end 152 if (o.hittype == kMousePickHitType_Dynamic ) then hitinfo = hitinfo.."dynamic" end 157 if (o.hittype == kMousePickHitType_Dynamic ) then 158 if (gTileTypeLoader) then 159 local t = GetStaticTileType(data.artid) 160 if (t and t.msName) then hitinfo = hitinfo..t.msName.."," end 161 if (t and t.miFlags) then hitinfo = hitinfo.."tflag="..hex(t.miFlags).."," end 162 end 163 hitinfo = hitinfo.."oflag="..hex(data.flag or 0).."," 164 hitinfo = hitinfo.."dynamic" 165 end 153 166 if (o.hittype == kMousePickHitType_Mobile ) then hitinfo = hitinfo.."mobile" end 154 167 if (o.hittype == kMousePickHitType_ContainerItem ) then hitinfo = hitinfo.."containeritem" end -
trunk/lua/lib.cursor.lua
r3024 r3210 171 171 if (hitobject.hittype == kMousePickHitType_Dynamic) then 172 172 bSendPos = false 173 Send_Target_Dynamic(hitobject.dynamic) 173 local item = hitobject.dynamic 174 if (item and ItemIsMulti(item)) then 175 Send_Target_MultiPart( hitobject.hit_xloc or item.xloc, 176 hitobject.hit_yloc or item.yloc, 177 hitobject.hit_zloc or item.zloc,item,hitobject.hit_artid) 178 else 179 Send_Target_Dynamic(item) 180 end 174 181 end 175 182 … … 184 191 bSendPos = false 185 192 local x,y,z = GetMouseHitTileCoords() 186 Send_Target_Static(hitobject.hit_xloc or x,hitobject.hit_yloc or y,hitobject.hit_zloc or z,hitobject.entity,hitobject.hit_artid)193 Send_Target_Static(hitobject.hit_xloc or x,hitobject.hit_yloc or y,hitobject.hit_zloc or z,hitobject.entity,hitobject.hit_artid) 187 194 end 188 195 -
trunk/lua/net/net.cursor.lua
r3024 r3210 53 53 -- Send Targetcursor (0x6c) 54 54 function Send_Target (bIsPos,flag,serial,x,y,z,model) 55 print("Send_Target",bIsPos,hex(flag),hex(serial),x,y,z,hex(model)) 55 56 --printf("NET: Send_Target: %d 0x%02x 0x%08x %d %d %d 0x%04x\n",bIsPos and 1 or 0,flag,serial,x or 0,y or 0,z or 0,model or 0) 56 57 local out = GetSendFIFO() … … 106 107 Send_Target_Item(dynamic) -- compatible fieldnames 107 108 end 109 110 function Send_Target_MultiPart(x,y,z,item,hit_artid) 111 Send_Target(true,0,0,x or 0,y or 0,z or 0,hit_artid or item.artid or 0) 112 end -
trunk/plugins/loot.lua
r3206 r3210 201 201 if (artid == 0xe9d) then return false end -- music instruments 202 202 if (artid == 0xe9c) then return false end -- music instruments 203 --~if (artid == 0x1bfb and item.amount >= 30) then return true end -- bolts204 --~if (artid == 0x0f3f and item.amount >= 30) then return true end -- arrows203 if (artid == 0x1bfb and item.amount >= 30) then return true end -- bolts 204 if (artid == 0x0f3f and item.amount >= 30) then return true end -- arrows 205 205 if (1 == 2) then -- jewels 206 206 if (artid == 0xf21) then return true end -- star saphire
