Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int affect_add_new(lua_State * L){
- if (!lua_isnumber(L, 1) || !lua_isnumber(L, 2) || !lua_isnumber(L, 3))
- {
- sys_err("invalid argument");
- return 0;
- }
- CQuestManager & q = CQuestManager::instance();
- LPCHARACTER ch = q.GetCurrentCharacterPtr();
- int lp = lua_tonumber(L, 1);
- int bonus = lua_tonumber(L, 2);
- if (bonus >= MAX_APPLY_NUM || bonus < 1)
- {
- sys_err("apply is out of range : %d", bonus);
- return 0;
- }
- int value = lua_tonumber(L, 3);
- ch->AddAffect(lp, aApplyInfo[bonus].bPointType, value, 0, 91536000, 0, false);
- return 0;
- }
- int affect_remove_new(lua_State * L)
- {
- if (!lua_isnumber(L, 1))
- {
- sys_err("invalid argument");
- return 0;
- }
- CQuestManager & q = CQuestManager::instance();
- LPCHARACTER ch = q.GetCurrentCharacterPtr();
- int lp = lua_tonumber(L, 1);
- ch->RemoveAffect(lp);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement