/TGame/TCommon/Gene/Status/GEInvisibility.cpp

http://awoe.googlecode.com/ · C++ · 43 lines · 29 code · 7 blank · 7 comment · 1 complexity · 0be655646d3f2dae7c7a3a3e99e1c4d2 MD5 · raw file

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