mirror of
				https://github.com/ErikasKontenis/SabrehavenServer.git
				synced 2025-10-31 03:56:22 +01:00 
			
		
		
		
	fix capacity of OTC to no need divide by 100 and fix issue which got introduced with uh trap use target actions
This commit is contained in:
		| @@ -250,6 +250,9 @@ Thing* Game::internalGetThing(Player* player, const Position& pos, int32_t index | |||||||
| 				else { | 				else { | ||||||
| 					thing = tile->getTopCreature(); | 					thing = tile->getTopCreature(); | ||||||
| 				} | 				} | ||||||
|  | 				if (!thing) { | ||||||
|  | 					thing = tile->getUseItem(index); | ||||||
|  | 				} | ||||||
| 				break; | 				break; | ||||||
| 			} | 			} | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1952,7 +1952,7 @@ void ProtocolGame::AddPlayerStats(NetworkMessage& msg) | |||||||
| 	msg.add<uint16_t>(std::min<int32_t>(player->getHealth(), std::numeric_limits<uint16_t>::max())); | 	msg.add<uint16_t>(std::min<int32_t>(player->getHealth(), std::numeric_limits<uint16_t>::max())); | ||||||
| 	msg.add<uint16_t>(std::min<int32_t>(player->getMaxHealth(), std::numeric_limits<uint16_t>::max())); | 	msg.add<uint16_t>(std::min<int32_t>(player->getMaxHealth(), std::numeric_limits<uint16_t>::max())); | ||||||
| 	 | 	 | ||||||
| 	msg.add<uint16_t>(player->getFreeCapacity() / 100); | 	msg.add<uint16_t>(player->getFreeCapacity()); | ||||||
|  |  | ||||||
| 	msg.add<uint32_t>(std::min<uint32_t>(player->getExperience(), 0x7FFFFFFF)); | 	msg.add<uint32_t>(std::min<uint32_t>(player->getExperience(), 0x7FFFFFFF)); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 ErikasKontenis
					ErikasKontenis