Mountitem appears in playercorpse

Archive of posts related to former distro versions. Be aware that posts here do not refer to the current distro and may not work.

Moderators: POL Developer, Distro Developer

Locked
Kimungu
New User
Posts: 6
Joined: Tue Jan 22, 2013 7:54 am

Mountitem appears in playercorpse

Post by Kimungu » Sat Sep 14, 2013 5:56 pm

There is a bug on our shard for some time and it was not simple to reconstruct the circumstances:
  1. A player is riding an rideable (e.g. a horse) and dies.
    => The rideable stands in front of his corpse.
  2. He gets back to live and loots his corpse.
  3. Then he dies again.
    => Now there are two rideables in front of his corpse!
At 1. the mountitem appears in the corpse, thats the problem!
I've checked the mountitem, it is flagged newbie. That means usually, that it wouldn't be moved to the corpse.
I think the movement of the items from player to corpse is done by the core, am i right?

User avatar
atreiu
Grandmaster Poster
Posts: 144
Joined: Mon May 24, 2010 1:08 pm
Location: Russia, Moscow
Contact:

Re: Mountitem appears in playercorpse

Post by atreiu » Sat Sep 14, 2013 11:28 pm

chrdeath.src

Code: Select all

foreach it in EnumerateItemsInContainer(corpse)
	if (it.newbie)
	      MoveItemToContainer(it , ghost.backpack,0,0);
	endif
endforeach
but i think that reason in your mount scripts
thanks a lot to all POL devs you've made my hobby!
my addon for comfortable eScript compilation will save your time
drugs&drop for compile new one
alt+q - compile last script

Kimungu
New User
Posts: 6
Joined: Tue Jan 22, 2013 7:54 am

Re: Mountitem appears in playercorpse

Post by Kimungu » Sat Sep 14, 2013 11:45 pm

I don't want to bypass the problem. I want to solve it.

In the backpack of the ghost, there is the mountitem too. Then the rideable gets created and his mountitem where destroyed.
But in the corpse, there is still a duplicate of the mountitem.

There are several ways to bypass this bug, but that solves not the problem.

User avatar
atreiu
Grandmaster Poster
Posts: 144
Joined: Mon May 24, 2010 1:08 pm
Location: Russia, Moscow
Contact:

Re: Mountitem appears in playercorpse

Post by atreiu » Sun Sep 15, 2013 1:27 am

you are clean coder) take from svn and fix it)
thanks a lot to all POL devs you've made my hobby!
my addon for comfortable eScript compilation will save your time
drugs&drop for compile new one
alt+q - compile last script

Turley
POL Developer
Posts: 645
Joined: Sun Feb 05, 2006 4:45 am

Re: Mountitem appears in playercorpse

Post by Turley » Mon Sep 16, 2013 8:42 am

Yep its somehow a bug introduced a year ago.

But to defend the coder, its not completely his fault. Why exactly do you ignore the moveable state in your loot function?

Tomi
POL Developer
Posts: 475
Joined: Tue Feb 21, 2006 5:08 pm

Re: Mountitem appears in playercorpse

Post by Tomi » Mon Sep 16, 2013 2:30 pm

This problem is now fixed with the last revision of core

Locked