actually add and use AddKill modifier and remove dead code
This commit is contained in:
parent
6a7d6ffdf2
commit
7ac68d13bb
@ -157,17 +157,6 @@ pub trait EntityGateway: Send + Sync {
|
||||
async fn create_trade(&mut self, _char_id1: &CharacterEntityId, _char_id2: &CharacterEntityId) -> Result<TradeEntity, GatewayError> {
|
||||
unimplemented!();
|
||||
}
|
||||
async fn increment_kill_counter(&mut self, _item_entity_id: &ItemEntityId) -> Result<(), GatewayError> {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
async fn get_kill_counter() {
|
||||
unimplemented!();
|
||||
}
|
||||
|
||||
async fn set_kill_counter() {
|
||||
unimplemented!();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -78,6 +78,7 @@ pub struct InMemoryGateway {
|
||||
weapon_modifiers: Arc<Mutex<BTreeMap<ItemEntityId, Vec<weapon::WeaponModifier>>>>,
|
||||
unit_modifiers: Arc<Mutex<BTreeMap<ItemEntityId, Vec<unit::UnitModifier>>>>,
|
||||
trades: Arc<Mutex<Vec<TradeEntity>>>,
|
||||
unit_modifiers: Arc<Mutex<BTreeMap<ItemEntityId, Vec<unit::UnitModifier>>>>,
|
||||
}
|
||||
|
||||
impl Default for InMemoryGateway {
|
||||
@ -96,6 +97,7 @@ impl Default for InMemoryGateway {
|
||||
weapon_modifiers: Arc::new(Mutex::new(BTreeMap::new())),
|
||||
unit_modifiers: Arc::new(Mutex::new(BTreeMap::new())),
|
||||
trades: Arc::new(Mutex::new(Vec::new())),
|
||||
unit_modifiers: Arc::new(Mutex::new(BTreeMap::new())),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1684,10 +1684,4 @@ impl Weapon {
|
||||
| WeaponType::Scepter
|
||||
)
|
||||
}
|
||||
|
||||
pub fn increment_kill_counter(&mut self) {
|
||||
if let Some(kills) = self.kills {
|
||||
self.kills = Some(kills + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -411,7 +411,7 @@ where
|
||||
}
|
||||
|
||||
pub async fn player_killed_monster<EG>( id: ClientId,
|
||||
_pkt: &KillMonster, // use this later for turbo logging?
|
||||
pkt: &KillMonster,
|
||||
entity_gateway: &mut EG,
|
||||
client_location: &ClientLocation,
|
||||
clients: &Clients,
|
||||
|
@ -1,7 +1,4 @@
|
||||
/* TODO:
|
||||
1. test to check if sjs/lame/limiter drop with Some() kill counter enabled
|
||||
2. test to make sure other items drop with None kill counter
|
||||
3. test kill counters get incremented per kill
|
||||
4. test unsealing item:
|
||||
- client item id does not change
|
||||
- unsealed item no longer has kill counter
|
||||
|
Loading…
x
Reference in New Issue
Block a user