From 8d8f32b0817527add54be8548b6c57c332bad34f Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 12 Mar 2014 06:39:20 +0100 Subject: [PATCH] Partial 10.36 support, also fix #499 --- data/images/game/npcicons/icon_chat.png | Bin 0 -> 17268 bytes data/images/game/npcicons/icon_quest.png | Bin 0 -> 17319 bytes data/images/game/npcicons/icon_trade.png | Bin 0 -> 17471 bytes data/images/game/npcicons/icon_tradequest.png | Bin 0 -> 795 bytes modules/game_interface/gameinterface.lua | 2 +- modules/gamelib/const.lua | 2 +- modules/gamelib/creature.lua | 27 ++++++++++++++++++ modules/gamelib/game.lua | 2 +- src/client/const.h | 10 +++++++ src/client/creature.cpp | 20 ++++++++++++- src/client/creature.h | 5 ++++ src/client/game.cpp | 14 ++++++--- src/client/localplayer.cpp | 2 ++ src/client/luafunctions.cpp | 2 ++ src/client/protocolcodes.cpp | 11 +++++-- src/client/protocolgameparse.cpp | 11 ++++++- 16 files changed, 97 insertions(+), 11 deletions(-) create mode 100644 data/images/game/npcicons/icon_chat.png create mode 100644 data/images/game/npcicons/icon_quest.png create mode 100644 data/images/game/npcicons/icon_trade.png create mode 100644 data/images/game/npcicons/icon_tradequest.png diff --git a/data/images/game/npcicons/icon_chat.png b/data/images/game/npcicons/icon_chat.png new file mode 100644 index 0000000000000000000000000000000000000000..b0da15e0f6ac61475d6381e48d670e70228cf906 GIT binary patch literal 17268 zcmeI4e{37&8OJXzs@AMU-DrVQK~FA1E5yDZ_W8%jF|%WbM8$2Egf>By%H{5LeAK?X z-d$ohtQw_aT0vpbpwN{SDit9H6N5q|Bt-c!hO|mRLBK{;Rt#vp z)_t4c&tju*)S{?MUw6J8dv3UN6-6a~sSc0WBiWlpSuX}8MIQr!a?ya^6cxX*Y)JA} zVAEq@T-CaLXI^~SN2^M=ZFK^q1$S|c+DNqUqbaR~HVzC&*@(j=W zp@-kvuGv!AuUTtck(y2#ShA@awyJBiqbrT+6Lz=H=X8WV)$=MEs3Xm)vV#)E7{h5JX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HBWx9b5X-$>H*`-#xHl-GZMizv=C>8_sp?+xw?mdSA>B{o?Y}f&A*R zqdWY|k7V9WEn9vlvt#Fvw_P!_P4~X>@jt00LnjYx zeE#d{9lIa?bkCL4+syveGj|TLH(xzEICW_A;cJios!y4o{Q8~~w=Z~R)tlmP?I%mg zt*Y`~*B}0J{Mcn*yq^wi`S{c`%BsiTdg6uEx9)pn#n5HOFZ_dCAWGX3hx>0Qq~PQ7tteA%JLz9|Zkg_+&wuHAj^lcQ(*e9Sj`@2%_3 zc5R#bqxNj?%;4YSd%D)9d!)ZTwXw6j|Hx+_9{%Yoe|{;tXxU2P-mbN47SBBR^RBgU zB<~E2>^<|e{`$Yd{OuoH1NKedoq1L~X#D4^zLQH2FQQib?4F~)?>~9kc`rtPW_|kU I)NOZt3te9BSO5S3 literal 0 HcmV?d00001 diff --git a/data/images/game/npcicons/icon_quest.png b/data/images/game/npcicons/icon_quest.png new file mode 100644 index 0000000000000000000000000000000000000000..dcc886078d96dd9226594e7330a5f7ec13c385de GIT binary patch literal 17319 zcmeI4du$ZP9mm(9O0lZ|0g6c)iS1D#B6{A3Z||`>AHA1j7tV3dEE7;~z4G1e zb$9JMQ#Ftm4QbTM;6Um`1OlZ|s0hs;tx)7f3ZYVkS|AjvLKUH?Q2I!sJlY_XlFr`V zWAA)tJayAH(wubO^UUw}o!QU)=C{AyKXylN&po%b+}T19#BJSOkvKdqHNOjQg?~5w z=KBNi(46fW)CpqItLC@qiFJ!UM-agu$o&Z;5!=X%YNkz))Ff!jXR^?mApGm|SwS2D z2AKpyveMyr`=ys1q%3tf2Dlg<%Z9H=1n8nBXAN0ZNK;oxs-s4S!(k3o{uIwElPwRV=tXvrB9#}i z6w^ji^_;T9s-fz`Y6I7DcS8Y5EDxF;)zXD?lSB%nK?W#>4*i(A1H(0m#mcUA=bOpY z_0)~%7(`G+TGvzWAI}0R4s>-?6G3zg&SZ7Hv)7F{sI1N$q@a0SAwy0z&@p=&!UK7^ zft%T5xfNo{T53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ade.png new file mode 100644 index 0000000000000000000000000000000000000000..87db9f0cd474bbb3eeb18847492ae9870a602daa GIT binary patch literal 17471 zcmeI4eQXow9mg--w3aN%24f4*RCSD$mKWzY($j(>UX_xnE2eV*s}-S6&?du;x^Ir+KMaxo0cuc`Lbf!|5$_pWb%zYC79 zZv;OR!qv?(h7}xEzd29ND!3cN%6}?0G$~EK2N+HYma@FmB9z90Vc?Bn&azmT<=O?s z&?2;oA(!#;-u*^{$h(Y7 znTffKaa{)3YBO#$#9fqjm$6*!(9qW?af`KljO&mdy2AiXlq%97ToNb^8(u|V? zPB}~@$yjU*X*DE2Mt3f-oDts7)Oo6s-GTpH#x_L>GdLcNMoXjSQYq4klMaUiCn%hv zOu)k=cZC!-W(vvE6Cx=ck05gqF|3GE$e`-7EmDW#G8)y6;3s)r!7%J7Bq!Mcig=6- z<76p;XA26qNs1)5Nuz|q!=noD9PBjQ5edZ4jpuM7AOwYwB7-Y6qY4ijN%Agv7PU?|%xf?^0lBa-mU(C~r%!?OyTQn8o_AOut>hPE>n^DKgd zD#Ls;btGQ&cOj{yJvAC|oideDK#KSzUT~Y8c(&%OQ67owP}ggDh!bQ$SJqGm?BiRy zf^8k%nmP~=-2indFY=6qrY!aYl7fp_A=TGPYI3=>CA+|5rvp{)rW zT|e3;gvQDQ38}c(=pwS@SE6i0C~pP3X=Hw?w`vnqLUDLVrgZil1K7m(WI!Cp1juaX zIPq8BY;lhpKW$GX;{OeP6?CF!u8j?~3cMRnE!b4US82xVHj?1^7Q4w|0~abkXK69n zTR4Y_x7ta?wvPc-C#ZtrdCN^Y@eyqr zwfM0nwR#M6#H&Mxl^`hsJZJ!)WT^IVW@z)+q1wZlq3Os6L!#oQlD%a#YogS9)5LvN zJ$N1?xUDp8rk!|Zb7sVRF(w3>JR-QylGXZ`v?pUS4`dB&9xYIFAQ_k_88uH%;uDi- z1tL&t?e3Hs=`APN*i$Av-(`slbI3KT=f zg+dAX=(r#X6hp^_LJ9ilxF8A?L&t?e3Hs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#CmLJ=PQd9C}>d|NF1q z_j|j)*D)O0(5u3jvFp?_gOfEI4*nBe$g<#z2=}s=T5tWbC10iTvG#;Y2(DFKy1byU z?q$M{rlQUrhvoOwuVG@daop)LXS2^FADvSHb3ZKem8h+)KJ=|TnSqg0z|B`CzFw;D z=0x=;pMN+ptez+2urj7-=~a#AFTX!j5LMnQUbr;tl#RCTegnnRQLLX?ZcgoVt=v=m zuf@%ES>VLj>g{_Nn(vDfW(oqo?qAb93uE z(MJ})+1)F)9_FrJ_zD;?un1!Wvav*1z?BJ}K$-7pDUKmPnh6wXhFpgXMB4VVd|_*f zJ8;o8Um;{q^NU4`<=ot5fvhbLRIRxD_;f3pt*#t&nRIKJV|~SvFHdX#)Yfu3tb3&I z+3;oJ2YsJc?9AULJ97%OUSywUC)BsxSujd$T1!;%(-Yo-5{7fn=(Mf57q>P+L}c!7 z%U%4xVm7NEw)l5yYqTtbVq?t2xf4Ft1kSp?uI03E@!p4JcfxlW##&aF+{=y4^!5wb zezTx%n)!=awu~pjPDf4H?7r{U7Z3k!D}OIIzx4X*))%)setColor(Color::black); g_painter->drawFilledRect(backgroundRect); @@ -287,6 +288,11 @@ void Creature::drawInformation(const Point& point, bool useGray, const Rect& par Rect emblemRect = Rect(backgroundRect.x() + 13.5 + 12, backgroundRect.y() + 16, m_emblemTexture->getSize()); g_painter->drawTexturedRect(emblemRect, m_emblemTexture); } + if(m_icon != Otc::NpcIconNone && m_iconTexture) { + g_painter->setColor(Color::white); + Rect iconRect = Rect(backgroundRect.x() + 13.5 + 12, backgroundRect.y() + 5, m_iconTexture->getSize()); + g_painter->drawTexturedRect(iconRect, m_iconTexture); + } } void Creature::turn(Otc::Direction direction) @@ -708,6 +714,12 @@ void Creature::setEmblem(uint8 emblem) callLuaField("onEmblemChange", m_emblem); } +void Creature::setIcon(uint8 icon) +{ + m_icon = icon; + callLuaField("onIconChange", m_icon); +} + void Creature::setSkullTexture(const std::string& filename) { m_skullTexture = g_textures.getTexture(filename); @@ -733,6 +745,12 @@ void Creature::setEmblemTexture(const std::string& filename) m_emblemTexture = g_textures.getTexture(filename); } +void Creature::setIconTexture(const std::string& filename) +{ + m_iconTexture = g_textures.getTexture(filename); +} + + void Creature::setSpeedFormula(double speedA, double speedB, double speedC) { m_speedFormula[Otc::SpeedFormulaA] = speedA; diff --git a/src/client/creature.h b/src/client/creature.h index ff2c5258..eb14c267 100644 --- a/src/client/creature.h +++ b/src/client/creature.h @@ -61,9 +61,11 @@ public: void setSkull(uint8 skull); void setShield(uint8 shield); void setEmblem(uint8 emblem); + void setIcon(uint8 icon); void setSkullTexture(const std::string& filename); void setShieldTexture(const std::string& filename, bool blink); void setEmblemTexture(const std::string& filename); + void setIconTexture(const std::string& filename); void setPassable(bool passable) { m_passable = passable; } void setSpeedFormula(double speedA, double speedB, double speedC); @@ -83,6 +85,7 @@ public: uint8 getSkull() { return m_skull; } uint8 getShield() { return m_shield; } uint8 getEmblem() { return m_emblem; } + uint8 getIcon() { return m_icon; } bool isPassable() { return m_passable; } Point getDrawOffset(); int getStepDuration(bool ignoreDiagonal = false, Otc::Direction dir = Otc::InvalidDirection); @@ -146,9 +149,11 @@ protected: uint8 m_skull; uint8 m_shield; uint8 m_emblem; + uint8 m_icon; TexturePtr m_skullTexture; TexturePtr m_shieldTexture; TexturePtr m_emblemTexture; + TexturePtr m_iconTexture; stdext::boolean m_showShieldTexture; stdext::boolean m_shieldBlink; stdext::boolean m_passable; diff --git a/src/client/game.cpp b/src/client/game.cpp index 8a926d7e..dd07e6fa 100644 --- a/src/client/game.cpp +++ b/src/client/game.cpp @@ -1459,7 +1459,7 @@ void Game::setProtocolVersion(int version) if(isOnline()) stdext::throw_exception("Unable to change protocol version while online"); - if(version != 0 && (version < 760 || version > 1035)) + if(version != 0 && (version < 760 || version > 1036)) stdext::throw_exception(stdext::format("Protocol version %d not supported", version)); m_features.reset(); @@ -1563,9 +1563,15 @@ void Game::setProtocolVersion(int version) } if (version >= 1035) { - enableFeature(Otc::GameDoubleSkills); - enableFeature(Otc::GameBaseSkillU16); + enableFeature(Otc::GameDoubleSkills); + enableFeature(Otc::GameBaseSkillU16); } + + if(version >= 1036) { + enableFeature(Otc::GameCreatureIcons); + enableFeature(Otc::GameHideNpcNames); + } + m_protocolVersion = version; Proto::buildMessageModesMap(version); @@ -1581,7 +1587,7 @@ void Game::setClientVersion(int version) if(isOnline()) stdext::throw_exception("Unable to change client version while online"); - if(version != 0 && (version < 760 || version > 1035)) + if(version != 0 && (version < 760 || version > 1036)) stdext::throw_exception(stdext::format("Client version %d not supported", version)); m_clientVersion = version; diff --git a/src/client/localplayer.cpp b/src/client/localplayer.cpp index 933084d6..0420aa7f 100644 --- a/src/client/localplayer.cpp +++ b/src/client/localplayer.cpp @@ -297,9 +297,11 @@ void LocalPlayer::onAppear() { Creature::onAppear(); + /* Does not seem to be needed anymore // on teleports lock the walk if(!m_oldPosition.isInRange(m_position,1,1)) lockWalk(); + */ } void LocalPlayer::onPositionChange(const Position& newPos, const Position& oldPos) diff --git a/src/client/luafunctions.cpp b/src/client/luafunctions.cpp index 8e9f1be8..093c651e 100644 --- a/src/client/luafunctions.cpp +++ b/src/client/luafunctions.cpp @@ -436,6 +436,7 @@ void Client::registerLuaFunctions() g_lua.bindClassMemberFunction("getSkull", &Creature::getSkull); g_lua.bindClassMemberFunction("getShield", &Creature::getShield); g_lua.bindClassMemberFunction("getEmblem", &Creature::getEmblem); + g_lua.bindClassMemberFunction("getIcon", &Creature::getIcon); g_lua.bindClassMemberFunction("setOutfit", &Creature::setOutfit); g_lua.bindClassMemberFunction("getOutfit", &Creature::getOutfit); g_lua.bindClassMemberFunction("setOutfitColor", &Creature::setOutfitColor); @@ -448,6 +449,7 @@ void Client::registerLuaFunctions() g_lua.bindClassMemberFunction("setSkullTexture", &Creature::setSkullTexture); g_lua.bindClassMemberFunction("setShieldTexture", &Creature::setShieldTexture); g_lua.bindClassMemberFunction("setEmblemTexture", &Creature::setEmblemTexture); + g_lua.bindClassMemberFunction("setIconTexture", &Creature::setIconTexture); g_lua.bindClassMemberFunction("showStaticSquare", &Creature::showStaticSquare); g_lua.bindClassMemberFunction("hideStaticSquare", &Creature::hideStaticSquare); g_lua.bindClassMemberFunction("isWalking", &Creature::isWalking); diff --git a/src/client/protocolcodes.cpp b/src/client/protocolcodes.cpp index 5fea82dd..6cc9a95e 100644 --- a/src/client/protocolcodes.cpp +++ b/src/client/protocolcodes.cpp @@ -28,8 +28,15 @@ std::map messageModesMap; void buildMessageModesMap(int version) { messageModesMap.clear(); - if(version >= 900) { - for(int i=Otc::MessageNone;i<=Otc::MessageBeyondLast;++i) + if(version >= 1036) { + for(int i = Otc::MessageNone; i <= Otc::MessageBeyondLast; ++i) { + if(i >= Otc::MessageNpcTo) + messageModesMap[i] = i + 1; + else + messageModesMap[i] = i; + } + } else if(version >= 900) { + for(int i = Otc::MessageNone; i <= Otc::MessageBeyondLast; ++i) messageModesMap[i] = i; } else if(version >= 861) { messageModesMap[Otc::MessageNone] = 0; diff --git a/src/client/protocolgameparse.cpp b/src/client/protocolgameparse.cpp index 1ef15751..08ba09e1 100644 --- a/src/client/protocolgameparse.cpp +++ b/src/client/protocolgameparse.cpp @@ -1879,7 +1879,6 @@ CreaturePtr ProtocolGame::getCreature(const InputMessagePtr& msg, int type) CreaturePtr creature; bool known = (type != Proto::UnknownCreature); - if(type == Proto::OutdatedCreature || type == Proto::UnknownCreature) { if(known) { uint id = msg->getU32(); @@ -1944,6 +1943,7 @@ CreaturePtr ProtocolGame::getCreature(const InputMessagePtr& msg, int type) // emblem is sent only when the creature is not known int emblem = -1; + int icon = -1; bool unpass = true; uint8 mark; @@ -1952,6 +1952,13 @@ CreaturePtr ProtocolGame::getCreature(const InputMessagePtr& msg, int type) if(g_game.getFeature(Otc::GameThingMarks)) { msg->getU8(); // creature type for summons + } + + if(g_game.getFeature(Otc::GameCreatureIcons)) { + icon = msg->getU8(); + } + + if(g_game.getFeature(Otc::GameThingMarks)) { mark = msg->getU8(); // mark msg->getU16(); // helpers @@ -1977,6 +1984,8 @@ CreaturePtr ProtocolGame::getCreature(const InputMessagePtr& msg, int type) creature->setLight(light); if(emblem != -1) creature->setEmblem(emblem); + if(icon != -1) + creature->setIcon(icon); if(creature == m_localPlayer && !m_localPlayer->isKnown()) m_localPlayer->setKnown(true);