1
This commit is contained in:
parent
358672e2d5
commit
b705f553f5
@ -3,16 +3,20 @@
|
||||
#include "mt/KillReward.h"
|
||||
|
||||
IMPL_TABLE(mt::KillReward)
|
||||
std::map<int, const mt::KillReward*> mt::KillReward::kill_hash_;
|
||||
|
||||
namespace mt
|
||||
{
|
||||
|
||||
void KillReward::Init1()
|
||||
{
|
||||
kill_hash_[kill_num()] = this;
|
||||
}
|
||||
|
||||
float KillReward::GetKillRewardParam(int kill_num)
|
||||
{
|
||||
#if 0
|
||||
auto itr = loader_->killreward_hash.find(kill_num);
|
||||
return itr != loader_->killreward_hash.end() ? itr->second->pb->parameter() : 0.0f;
|
||||
#endif
|
||||
auto itr = kill_hash_.find(kill_num);
|
||||
return itr != kill_hash_.end() ? itr->second->parameter() : 0.0f;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -11,8 +11,13 @@ namespace mt
|
||||
"kill_num")
|
||||
public:
|
||||
|
||||
void Init1();
|
||||
static float GetKillRewardParam(int kill_num);
|
||||
|
||||
private:
|
||||
|
||||
static std::map<int, const mt::KillReward*> kill_hash_;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user