/TGame/TCommon/Gene/Status/GEStun.cpp

http://awoe.googlecode.com/ · C++ · 41 lines · 29 code · 5 blank · 7 comment · 1 complexity · e38b1389529b401df031bfae126a5c99 MD5 · raw file

  1. ///////////////////////////////////////////////////////////////////////////////////////////////////
  2. // GEStun.cpp
  3. // 2010?1?20?
  4. // Copyright ?2007, 2010, 8DWorld, Inc. All rights reserved.
  5. //
  6. //
  7. ///////////////////////////////////////////////////////////////////////////////////////////////////
  8. #include "stdafx.h"
  9. #include "GEStun.h"
  10. #include "Entity/EntityIf.h"
  11. #include "Combat/CombatSysIf.h"
  12. #include "Gene/GeneCreateDataIf.h"
  13. GEStun::GEStun()
  14. {
  15. }
  16. bool
  17. GEStun::onAttach()
  18. {
  19. if (__super::onAttach())
  20. {
  21. m_wpHost->setMoveState(Move::mst_Freeze);
  22. m_wpCombat->setFlg(Combat::FIdx_ZeroToDodge);
  23. return true;
  24. }
  25. else
  26. {
  27. return false;
  28. }
  29. }
  30. bool
  31. GEStun::onDetach()
  32. {
  33. m_wpHost->setMoveState(Move::mst_Idle);
  34. m_wpCombat->clrFlg(Combat::FIdx_ZeroToDodge);
  35. return __super::onDetach();
  36. }