diff --git a/src/DB/Emotions.js b/src/DB/Emotions.js index e329453..7bcb325 100644 --- a/src/DB/Emotions.js +++ b/src/DB/Emotions.js @@ -257,17 +257,29 @@ define(function() // ET_PANIC = 79 [ 78, 62, "panic", "e32", "øÈ²" ], - // ET_WHISP = 80 - [ 79, 63, "whisp", "e33", "À§½ºÆÛ" ] - -/* -80 ! quest -81 ? quest -82 ! job -83 ? job -84 ! special -85 ? special -*/ + // ET_WHISP = 80 + [ 79, 63, "whisp", "e33", "À§½ºÆÛ" ], + + // ET_!QUEST = 81 / 0 + [ 80, -1 ], + + // ET_?QUEST = 82 / 1 + [ 81, -1 ], + + // ET_!JOB = 83 / 2 + [ 82, -1 ], + + // ET_?JOB = 84 / 3 + [ 83, -1 ], + + // ET_!EVENT = 85 / 4 + [ 84, -1 ], + + // ET_?EVENT = 86 / 5 + [ 85, -1 ], + + // ET_??? = 87 / 6 + [ 86, -1 ] ]; var i, j, count, size; diff --git a/src/Engine/MapEngine/Entity.js b/src/Engine/MapEngine/Entity.js index 0cef6b0..684d7d8 100644 --- a/src/Engine/MapEngine/Entity.js +++ b/src/Engine/MapEngine/Entity.js @@ -39,6 +39,7 @@ define(function( require ) var StatusIcons = require('UI/Components/StatusIcons/StatusIcons'); var BasicInfo = require('UI/Components/BasicInfo/BasicInfo'); var Escape = require('UI/Components/Escape/Escape'); + var MiniMap = require('UI/Components/MiniMap/MiniMap'); /** @@ -478,6 +479,57 @@ define(function( require ) } + /** + * Shows notification effect for quests and events + * + * @param {object} pkt - PACKET.ZC.QUEST_NOTIFY_EFFECT + */ + function onEntityQuestNotifyEffect( pkt ) { + var Entity = EntityManager.get(pkt.npcID); + var color = 0; + + if (pkt.effect !== 9999) { + var emotionId = pkt.effect + 81; + + if (Entity && (pkt.effect in Emotions.indexes)) { + Entity.attachments.add({ + frame: Emotions.indexes[emotionId], + file: 'emotion', + play: true, + head: true, + repeat: true, + depth: 5.0 + }); + } + + } + + switch (pkt.color + 1) { + case 1: + // yellow + color = 0xffff00; + break; + case 2: + // orange + color = 0xffa500; + break; + case 3: + // green + color = 0x00e16a; + break; + case 4: + // purple + color = 0x800080; + break; + case 0: + default: + return; + } + + MiniMap.addNpcMark( pkt.npcID, pkt.xPos, pkt.yPos, color, Infinity); + } + + /** * Updating entity direction * @@ -1024,5 +1076,6 @@ define(function( require ) Network.hookPacket( PACKET.ZC.RESURRECTION, onEntityResurect); Network.hookPacket( PACKET.ZC.EMOTION, onEntityEmotion); Network.hookPacket( PACKET.ZC.NOTIFY_MONSTER_HP, onEntityLifeUpdate); - }; + Network.hookPacket( PACKET.ZC.QUEST_NOTIFY_EFFECT, onEntityQuestNotifyEffect); + }; }); \ No newline at end of file diff --git a/src/Network/PacketStructure.js b/src/Network/PacketStructure.js index 554381f..51c28b2 100644 --- a/src/Network/PacketStructure.js +++ b/src/Network/PacketStructure.js @@ -9451,7 +9451,7 @@ define(['Utils/BinaryWriter', './PacketVerManager'], function(BinaryWriter, PACK this.xPos = fp.readShort(); this.yPos = fp.readShort(); this.effect = fp.readShort(); - this.type = fp.readShort(); + this.color = fp.readShort(); }; PACKET.ZC.QUEST_NOTIFY_EFFECT.size = 14; diff --git a/src/UI/Components/ItemInfo/ItemInfo.css b/src/UI/Components/ItemInfo/ItemInfo.css index 85fb8a4..4f2ee88 100644 --- a/src/UI/Components/ItemInfo/ItemInfo.css +++ b/src/UI/Components/ItemInfo/ItemInfo.css @@ -1,10 +1,11 @@ .ItemInfo { position:absolute; top:0px; left:0px; width:280px; background-repeat:no-repeat; background-color:transparent; } -.ItemInfo .container { height:120px; position:relative; } +.ItemInfo .container { height:120px; position:relative; box-shadow: white 0px 0px 0px 3px inset, rgb(192, 192, 192) 0px 0px 0px 4px inset; background-repeat: no-repeat; background-color: white; border-radius: 10px; } .ItemInfo .view { position:absolute; width:42px; height:20px; background-repeat:no-repeat; background-color:transparent; border:none; top:6px; left:6px; } .ItemInfo .collection { position:absolute; top:11px; left:10px; width:75px; height:100px; background-repeat:no-repeat; background-color:transparent; } .ItemInfo .title { position:absolute; top:3px; left:86px; width:185px; height:14px; padding-left:4px; padding-top:6px; font-size:12px; text-shadow:1px 1px 0px white; white-space:nowrap; } .ItemInfo .close { position:absolute; top:3px; right:3px; width:11px; height:11px; display:block; background-repeat:no-repeat; background-color:transparent; border:none; } .ItemInfo .description { position:absolute; top:35px; left:100px; line-height:18px; width:170px; height:75px; overflow-y:auto;} +.ItemInfo .description .description-inner { width: 150px } .ItemInfo .extend { position:absolute; right:4px; bottom:3px; width:13px; height:13px; border:none; background-repeat:no-repeat; background-color:transparent; } .ItemInfo .cardlist { border-radius:5px; background:white; padding:2px; margin-top:3px; } diff --git a/src/UI/Components/ItemInfo/ItemInfo.html b/src/UI/Components/ItemInfo/ItemInfo.html index bffd62d..c58c981 100644 --- a/src/UI/Components/ItemInfo/ItemInfo.html +++ b/src/UI/Components/ItemInfo/ItemInfo.html @@ -1,11 +1,15 @@ -