diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-11-08 23:40:50 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-11-08 23:40:50 +0300 |
commit | 80792e881942a1cdbc10050177df888bbad44a9e (patch) | |
tree | 2477945c0a6d3bc50c46fd9aeb9d52d87d5b52d1 /src/net/eathena | |
parent | 7ca06be4b1a8dab21d21ddbab078ef7fed8cd1f8 (diff) | |
download | manaverse-80792e881942a1cdbc10050177df888bbad44a9e.tar.gz manaverse-80792e881942a1cdbc10050177df888bbad44a9e.tar.bz2 manaverse-80792e881942a1cdbc10050177df888bbad44a9e.tar.xz manaverse-80792e881942a1cdbc10050177df888bbad44a9e.zip |
Add npc option for allow equipment.
New option: allowEquipment
Default value: false
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/beingrecv.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp index 7a91b413b..b1daece88 100644 --- a/src/net/eathena/beingrecv.cpp +++ b/src/net/eathena/beingrecv.cpp @@ -131,17 +131,20 @@ static void setBasicFields(Being *restrict const dstBeing, { dstBeing->setGender(Being::intToGender(gender)); } - dstBeing->setHairColor(hairColor); - dstBeing->setHairStyle(SPRITE_HAIR_COLOR, -hairStyle); - // for npc not checking updateSlots flag, - // probably because npc missing visible packet if moving - dstBeing->updateSprite(SPRITE_WEAPON, headBottom); - dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid); - dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop); - dstBeing->updateSprite(SPRITE_HAIR, shoes); - dstBeing->updateSprite(SPRITE_SHOES, gloves); - dstBeing->updateSprite(SPRITE_BODY, weapon); - dstBeing->setWeaponId(weapon); + if (dstBeing->getAllowNpcEquipment()) + { + dstBeing->setHairColor(hairColor); + dstBeing->setHairStyle(SPRITE_HAIR_COLOR, -hairStyle); + // for npc not checking updateSlots flag, + // probably because npc missing visible packet if moving + dstBeing->updateSprite(SPRITE_WEAPON, headBottom); + dstBeing->updateSprite(SPRITE_HEAD_BOTTOM, headMid); + dstBeing->updateSprite(SPRITE_CLOTHES_COLOR, headTop); + dstBeing->updateSprite(SPRITE_HAIR, shoes); + dstBeing->updateSprite(SPRITE_SHOES, gloves); + dstBeing->updateSprite(SPRITE_BODY, weapon); + dstBeing->setWeaponId(weapon); + } break; default: case ActorType::Monster: |