From: Thomas T. <to...@us...> - 2004-07-02 02:18:31
|
Update of /cvsroot/planeshift/planeshift/src/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13378 Modified Files: workmanager.cpp Log Message: Fixed bugs where sector, crafterID, owner, etc were not being set. Index: workmanager.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/server/workmanager.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** workmanager.cpp 1 Jul 2004 23:37:51 -0000 1.35 --- workmanager.cpp 2 Jul 2004 02:18:22 -0000 1.36 *************** *** 1142,1145 **** --- 1142,1158 ---- workItem->AddItemToContainer( newItem ); + // Set current player ID and Guild to creator mark + newItem->SetCrafterID( worker->GetPlayerID() ); + newItem->SetIsCrafterIDValid( true ); + newItem->SetGuildID( worker->GetGuild()->id ); + newItem->SetIsGuildIDValid( true ); + newItem->SetOwningCharacter( owner ); + newItem->SetCharIDOwner( worker->GetPlayerID() ); + + // Get sector of container to set locations in world + float xpos,ypos,zpos,yrot; + psSectorInfo* sectorinfo; + workItem->GetLocationInWorld( §orinfo, xpos, ypos, zpos, yrot ); + newItem->SetLocationInWorld( sectorinfo, 0.00, 0.00, 0.00, 0.00 ); return true; } *************** *** 1176,1179 **** --- 1189,1206 ---- // Add the new combinations result item to the container workItem->AddItemToContainer( newItem ); + + // Set current player ID and Guild to creator mark + newItem->SetCrafterID( worker->GetPlayerID() ); + newItem->SetIsCrafterIDValid( true ); + newItem->SetGuildID( worker->GetGuild()->id ); + newItem->SetIsGuildIDValid( true ); + newItem->SetOwningCharacter( owner ); + newItem->SetCharIDOwner( worker->GetPlayerID() ); + + // Get sector of container to set locations in world + float xpos,ypos,zpos,yrot; + psSectorInfo* sectorinfo; + workItem->GetLocationInWorld( §orinfo, xpos, ypos, zpos, yrot ); + newItem->SetLocationInWorld( sectorinfo, 0.00, 0.00, 0.00, 0.00 ); return true; } *************** *** 1194,1198 **** // Put the new item into slot owner->EquipItemInSlot(slot, newItem); ! return true; } --- 1221,1239 ---- // Put the new item into slot owner->EquipItemInSlot(slot, newItem); ! ! // Set current player ID and Guild to creator mark ! newItem->SetCrafterID( worker->GetPlayerID() ); ! newItem->SetIsCrafterIDValid( true ); ! newItem->SetGuildID( worker->GetGuild()->id ); ! newItem->SetIsGuildIDValid( true ); ! newItem->SetOwningCharacter( owner ); ! newItem->SetCharIDOwner( worker->GetPlayerID() ); ! ! // Get sector of container to set locations in world ! float xpos,ypos,zpos,yrot; ! psSectorInfo* sectorinfo; ! workItem->GetLocationInWorld( §orinfo, xpos, ypos, zpos, yrot ); ! newItem->SetLocationInWorld( sectorinfo, 0.00, 0.00, 0.00, 0.00 ); ! return true; } *************** *** 1221,1234 **** // Set current player ID and Guild to creator mark ! newItem->SetCrafterID( workerCID ); newItem->SetIsCrafterIDValid( true ); newItem->SetGuildID( worker->GetGuild()->id ); newItem->SetIsGuildIDValid( true ); ! // // Get sector of container to set locations in world ! // float xpos,ypos,zpos,yrot; ! // psSectorInfo* sectorinfo; ! // workItem->GetLocationInWorld( §orinfo, xpos, ypos, zpos, yrot ); ! // newItem->SetLocationInWorld( sectorinfo, 0.00, 0.00, 0.00, 0.00 ); return newItem; } --- 1262,1277 ---- // Set current player ID and Guild to creator mark ! newItem->SetCrafterID( worker->GetPlayerID() ); newItem->SetIsCrafterIDValid( true ); newItem->SetGuildID( worker->GetGuild()->id ); newItem->SetIsGuildIDValid( true ); + newItem->SetOwningCharacter( owner ); + newItem->SetCharIDOwner( worker->GetPlayerID() ); ! // Get sector of container to set locations in world ! float xpos,ypos,zpos,yrot; ! psSectorInfo* sectorinfo; ! workItem->GetLocationInWorld( §orinfo, xpos, ypos, zpos, yrot ); ! newItem->SetLocationInWorld( sectorinfo, 0.00, 0.00, 0.00, 0.00 ); return newItem; } |