From: <mg...@us...> - 2008-07-30 12:36:32
|
Revision: 1969 http://planeshift.svn.sourceforge.net/planeshift/?rev=1969&view=rev Author: mgist Date: 2008-07-30 12:36:42 +0000 (Wed, 30 Jul 2008) Log Message: ----------- - Merged r1968 from trunk. Modified Paths: -------------- stable/docs/history.txt stable/src/server/gem.cpp Property Changed: ---------------- stable/ Property changes on: stable ___________________________________________________________________ Modified: svn:mergeinfo - /trunk:1911,1915-1916,1918-1919,1923-1927,1930,1934,1936,1939,1941,1945-1949,1951-1953,1958,1960-1961,1964,1966 + /trunk:1911,1915-1916,1918-1919,1923-1927,1930,1934,1936,1939,1941,1945-1949,1951-1953,1958,1960-1961,1964,1966,1968 Modified: stable/docs/history.txt =================================================================== --- stable/docs/history.txt 2008-07-30 12:30:06 UTC (rev 1968) +++ stable/docs/history.txt 2008-07-30 12:36:42 UTC (rev 1969) @@ -1,4 +1,6 @@ *** 2008-07-30 by Andreas Heinchen +- Fixed inconsistency between world and database. + Fixed ownership of items moved from world container to world container. - completly fixed FS#1373, patch by weltall *** 2008-07-29 by Andreas Heinchen Modified: stable/src/server/gem.cpp =================================================================== --- stable/src/server/gem.cpp 2008-07-30 12:30:06 UTC (rev 1968) +++ stable/src/server/gem.cpp 2008-07-30 12:36:42 UTC (rev 1969) @@ -4022,7 +4022,17 @@ // If the gemContainer we are dropping the item into is not pickupable then we // guard the item placed inside. Otherwise the item becomes public. - item->SetGuardingCharacterID(item->GetOwningCharacterID()); + if (fromClient) + { + /* put the player behind the client as guard */ + item->SetGuardingCharacterID(fromClient->GetCharacterData()->characterid); + } + if (item->GetOwningCharacterID()) + { + /* item comes from a player () */ + item->SetGuardingCharacterID(item->GetOwningCharacterID()); + } + if (!GetItem()->GetIsNoPickup() && item->GetOwningCharacterID()) GetItem()->SetGuardingCharacterID(item->GetOwningCharacterID()); @@ -4100,6 +4110,9 @@ { // Split out the stack for the required amount. item = itemStack->SplitStack(stackCount); + + // Save the lowered value + itemStack->Save(false); } // Send out messages about the change in the item stack. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |