Added Market/MarketProtocol module to begin the construction of the Market! Fixed some Minor Issues, and Some Cosmetics

* Added new protocol lib.
* Added missing Game Features to game/const.lua
* Added new Market module that will handle the market/market protocols too.
* Finished Market protocol and begun on the market structure (MarketOffer etc).
* Removed any traces of market protocol in the core (I think).
* Moved minimap images to /images.
* Removed old zoom images for minimap.
* Fixed a bug with randomize outfit.
This commit is contained in:
BeniS
2012-07-18 02:36:27 +12:00
parent 12d30f7355
commit b7ac6ce6d5
24 changed files with 699 additions and 22 deletions

View File

@@ -34,9 +34,6 @@ SouthEast = 5
SouthWest = 6
NorthWest = 7
ClientEnterAccount = 1
ClientEnterGame = 10
LoginServerError = 10
LoginServerMotd = 20
LoginServerUpdateNeeded = 30
@@ -64,6 +61,8 @@ GameCreaturePassableInfo = 18
GameItemAnimationPhase = 19
GameTrucatedPingOpcode = 20
GameReverseCreatureStack = 21
GameMagicEffectU16 = 22
GamePlayerMarket = 23
OTSERV_RSA = "109120132967399429278860960508995541528237502902798129123468757937266291492576446330739696001110603907230888610072655818825358503429057592827629436413108566029093628212635953836686562675849720620786279431090218017681061521755056710823876476444260558147179707119674283982419152118103759076030616683978566631413"

View File

@@ -32,6 +32,7 @@ Module
- game_shaders
- game_playerdeath
- game_playermount
- game_market
@onLoad: |
dofile 'const'
@@ -40,3 +41,4 @@ Module
dofile 'creature'
dofile 'player'
dofile 'market'

38
modules/game/market.lua Normal file
View File

@@ -0,0 +1,38 @@
MarketAction = {
Buy = 0,
Sell = 1
}
MarketRequest = {
MyOffers = 0xFFFE,
MyHistory = 0xFFFF
}
MarketOfferState = {
Active = 0,
Cancelled = 1,
Expired = 2,
Accepted = 3,
AcceptedEx = 255
}
MarketItemDescription = {
Armor = 1,
Attack = 2,
Container = 3,
Defense = 4,
General = 5,
DecayTime = 6,
Combat = 7,
MinLevel = 8,
MinMagicLevel = 9,
Vocation = 10,
Rune = 11,
Ability = 12,
Charges = 13,
WeaponName = 14,
Weight = 15,
First = Armor,
Last = Weight
}

View File

@@ -4,7 +4,7 @@ ProtocolLogin = extends(Protocol)
-- private functions
local function sendLoginPacket(protocol)
local msg = OutputMessage.create()
msg:addU8(ClientEnterAccount)
msg:addU8(ClientOpcodes.ClientEnterAccount)
msg:addU16(1) -- todo: ClientOs
msg:addU16(g_game.getClientVersion())