chests no longer show as corpses to client in DoF, kept consistency in AoM. Disabled ability for a chest to drop from an existing chest when using GM kill command
This commit is contained in:
parent
c49802616e
commit
a9b68f5c53
2 changed files with 10 additions and 0 deletions
|
@ -42,6 +42,10 @@ NPC* Entity::DropChest() {
|
|||
// Check to see if treasure chests are disabled in the rules
|
||||
if (rule_manager.GetGlobalRule(R_World, TreasureChestDisabled)->GetBool())
|
||||
return 0;
|
||||
|
||||
if(GetChestDropTime()) {
|
||||
return 0; // this is a chest! It doesn't drop itself!
|
||||
}
|
||||
|
||||
NPC* chest = 0;
|
||||
|
||||
|
@ -52,6 +56,8 @@ NPC* Entity::DropChest() {
|
|||
chest->SetTargetable(1);
|
||||
chest->SetLevel(GetLevel());
|
||||
chest->SetChestDropTime();
|
||||
chest->SetTotalHP(100);
|
||||
chest->SetHP(100);
|
||||
chest->SetAlive(false);
|
||||
// Set the brain to a blank brain so it does nothing
|
||||
chest->SetBrain(new BlankBrain(chest));
|
||||
|
|
|
@ -2608,6 +2608,10 @@ void Spawn::InitializeInfoPacketData(Player* spawn, PacketStruct* packet) {
|
|||
|
||||
if (!Alive() && GetTotalHP() > 0 && !IsObject() && !IsGroundSpawn())
|
||||
temp_activity_status = 1;
|
||||
|
||||
if(version >= 1188 && GetChestDropTime()) {
|
||||
temp_activity_status = 0;
|
||||
}
|
||||
temp_activity_status += (IsNPC() || IsObject() || IsGroundSpawn()) ? 1 << 1 : 0;
|
||||
if (version >= 1188) {
|
||||
// Fix widget or sign having 'Play Legends of Norrath' or 'Tell' options in right click (client hard-coded entity commands)
|
||||
|
|
Loading…
Reference in a new issue